.htaccess issues on osx server

Discussion in 'Mac OS X Server, Xserve, and Networking' started by buster84, Aug 22, 2014.

  1. buster84 macrumors 6502

    Joined:
    Oct 7, 2013
    #1
    FYI I'm a total noob when it comes to websites :D. I have a mac pro desktop that i use as my media center and i recently decided that i want to be able to send links of my files to friends for them to download so i bought a domain name, bought osx server for mavericks and installed everything.

    So far i was able to create a homepage on my computer and when i loaded up my domain name it worked. Then I created a folder for my files and they are all fully accessible though the domain as well and download fine, but its to open to the public which i don't like.

    So i created a .htaccess file to password protect my files

    Then created the .htpasswd and stuck it in a directory (outside my main website directory but when ever i click the to download a file i get 500 internal server error instead of a request for a username/pass. I don't understand whats wrong since i checked "allow overrides using .htaccess files" in the advanced settings. I get the feeling that checking that little box isn't cutting it when it sure seems like it should...

    I have my site on a dedicated hard drive and i tried directing the .htaccess file to the .htpasswd file by the above link (in quote) and by "/2TB/users/.htpasswd" and "/users/.htpasswd" and i still get 500 internal error. Either I'm messing up on the directory location or something else is going on here. All the files are on the same hard drive as well.

    All i want to do is to be able to send a link to a friend in an e-mail with a username and password and allow him to click the link, enter his username and pass and download the file, but for the life of me i just can't get it to work.

    What am i doing wrong? How can i fix this and get the username and passwords to work?
     
  2. morespce54 macrumors 65816

    morespce54

    Joined:
    Apr 30, 2004
    Location:
    Around the World
    #2
    Can you open your
    Code:
    .htpasswd"
    with, let say, Safari? What is the path in the navig bar?
     
  3. saltyzoo macrumors 65816

    saltyzoo

    Joined:
    Oct 4, 2007
  4. saltyzoo macrumors 65816

    saltyzoo

    Joined:
    Oct 4, 2007
    #4

    Attached Files:

  5. willemvzyl macrumors newbie

    Joined:
    Sep 28, 2007
    #5
    Check the Apache log file when you try opening the page in your browser:

    tail -fn 100 /var/log/apache2/logs/error_log

    It'll tell you what's wrong with the configuration.
     
  6. OriginalMacRat macrumors 6502

    Joined:
    Mar 9, 2007
    #6
    How do you get to the advanced settings for the web server?
     

Share This Page