I had a Mac under OS X Lion. I upgrade it to Mountain Lion, and buy the OS X Server software in the AppStore.
Since the beginning, I use the Apache version bundled in Mac OS, and it work fine.
But after solving some problems (like the change of location of the main directory from /Library/WebServer/Documents
to /Library/Server/Web/Data/Sites/Default
), I can't figure out how to configure UserDir
to work again!
As explained here:
Please note – the Mountain Lion install removes the contents of the directory
/private/etc/apache2/users
so if you counted on those configuration files working for you, oops.
So, I follow advices found here, and finally my file /etc/apache2/extra/httpd-userdir.conf
look like this:
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received. Note that you must also set
# the default access control for these directories, as in the example below.
#
UserDir Sites
#
# Users might not be in /Users/*/Sites, so use user-specific config files.
#
Include /private/etc/apache2/users/*.conf
<IfModule bonjour_module>
RegisterUserSite customized-users
</IfModule>
<Directory "/Users/*/Sites/">
Options Indexes
Order allow,deny
Allow from all
</Directory>
But, event after some sudo apachectl restart
or reboot, impossible to acces again to my UserDir
/Users/utilisateur/Sites/
through http://127.0.0.1/~utilisateur
Can you provide me some advice for the configuration please?
Remember: I've installed the Server software from the AppStore.
Thank you in advance!
[EDIT] I also tried these recommendations: Mountain Lion, Apache, Sites folder, htaccess and mod_rewrite, but it dosen't help…
[EDIT 2] In response to the possible duplicate with "How do I get my user directory working for web sharing again?", I will say that in my case, it's not a permission denied
, but a 404 Not Found
. It is probably due to the concomitant installation of the OS X Server application from the AppStore, so, it's a distinct issue IMHO…
In fact, I've tested the solution provided, and it does not work at all for me.
Best Answer
It seems that the Apache configuration files in
/etc/apache2
are not at all considered by the Apache version provided by the Server application.With the Server application, all configurations are in
/Library/Server/Web/Config/apache2
As the
ReadMe.txt
of this directory says, the default apache configuration file ishttpd_server_app.conf
, and I just had to uncomment the lineInclude /private/etc/apache2/extra/httpd-userdir.conf
in this file!problem solved.
[EDIT] As notified by Kristopher Johnson, it may also be necessary to uncomment
LoadModule apple_userdir_module