Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

share|improve this question
    
possible duplicate of How do I get my user directory working for web sharing again? –  patrix Aug 7 '12 at 5:29
add comment

2 Answers

up vote 3 down vote accepted

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 is httpd_server_app.conf, and I just had to uncomment the line Include /private/etc/apache2/extra/httpd-userdir.conf in this file!

problem solved.

share|improve this answer
add comment

the answer is as follow:

you must to check if you have a file with the name .conf in this directory:

/private/etc/apache2/users/

by default I think you have the Guess.conf file with this content:

# cat /private/etc/apache2/users/Guest.conf 
<Directory "/Users/Guest/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

If you have the user "macuser" and you want to use localhost/~macuser URL, then you must create the macuser.conf with the correct information (Sites directory, probably /Users/macuser/Sites). After the change you need to restart the apache process:

sudo apachectl restart
share|improve this answer
    
The question is already answered, and this answer do not solve the problem at all because the Server App had moved the configuration files (as you can read in my solution). So, you replied without completely reading the question neither the answer... –  Pascal Qyy Oct 9 '12 at 21:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.