Home › Forums › OS X Server and Client Discussion › Web › htaccess on Mac OS X SERVER (10.2.8)
- This topic has 5 replies, 2 voices, and was last updated 19 years, 6 months ago by
Anonymous.
-
AuthorPosts
-
August 9, 2004 at 8:02 pm #358737
Anonymous
GuestI have many times successfully enabled htaccess files on mac os x CLIENT, but every time I try to enable htaccess on mac os x server (10.2.8) it fails. I have tried editing the AllowOverride directive in httpd.conf and httpd_macosxserver.conf and everytime apache refuses to restart. Does any one know how to get htaccess working in SERVER?
I have tried uncommenting out the default AllowOverride directive (in both httpd.conf and httpd_macosxserver.conf): # AllowOverride None
and changing it to:AllowOverride All
and
AllowOverride AuthConfig
(preferred method)I have been editing the files using sudo pico. Therefore the permisisons and ownership remain unchanged. Also after I make the edit and it does not restart, I go back and remove the edit (comment it out) and restart the sever using the same process without failure.
Here is the output when I try to restart apache (with the edit):
—————————————————————————-
[www:/etc/httpd] caupwc% sudo apachectl start
Syntax error on line 515 of /etc/httpd/httpd.conf:
AllowOverride not allowed here
/usr/sbin/apachectl start: httpd could not be started
—————————————————————————-Since I am simply removing the hash I know I am not putting the directive in the wrong place.
I also looked around in the log file but it is not displaying any errors regarding the configuration there.
Please no responces regarding CLIENT – I already know how to do this in CLIENT.
August 10, 2004 at 6:39 pm #358745Anonymous
GuestI am also going to have to use mod_pubcookie on this server and pubcookie works very similar to htaccess files. So just using the apple auth won’t work.
August 10, 2004 at 11:52 pm #358752honestpuck
ParticipantHi,
I think you’ll find that the best place to modify this is in the site config file which you’ll find in /etc/httpd/sites – if you only have the default site set up then it will be ‘0000_any_80_.conf’ and in that file you’ll find that the ‘AllowOverride None’ is not commented out – just change the line.
Tony
August 11, 2004 at 7:03 pm #358757Anonymous
GuestI found the problem and the solution to Mac OS X SERVER not running htaccess. The problem is two part. First by DEFAULT mod_auth is not loaded in to Apache by httpd.conf. Apple replaced Mod_Auth with Mod_auth_apple for whatever reasons they have. Here are the changes I made to httpd.conf:
I Added:
LoadModule auth_module /usr/libexec/httpd/mod_auth.so
AddModule mod_auth.cIn their respective locations.
I also commented out Mod_Auth_Apple:
#LoadModule apple_auth_module /usr/libexec/httpd/mod_auth_apple.so
#AddModule mod_auth_apple.cYou may be able to keep mod_auth_apple loaded, I did not test it as I want to keep things as simple as possible – avoid potential conflicts between the two mods.
The second part requires adding the AllowOverride directive into the virtual host definition in httpd_macosxserver.conf. Somewhere within this file you must have the following:
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
Allow from all
With these two changes to the apache configuration files OS X SERVER will now recognize properly formatted .htaccess files and verify against .htpasswd files.
October 18, 2005 at 4:23 am #363665Anonymous
GuestThat doesn’t work for Mac OS X 10.4 Server (Tiger)!!
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed