Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed a LAMP stack on my OpenSUSE 11.4 server. Currently, the DocumentRoot is set to /srv/www/htdocs but I want my users to be able to use ~/public_html just as they would in a shared hosting environment.

What Apache configuration changes do I need to make?

Do I need to change any settings in MySQL or in anything else that runs on the server?

share|improve this question

You need to make sure that mod_userdir is loaded and enabled. The following commands turn it on in my Debian-packaged version of Apache. This should work fine for OpenSUSE, although you might need to adjust the path to the module in the LoadModule directive. The command might already be in your httpd.conf but just commented out. At a minimum you will need LoadModule and the first UserDir directive, although the second one to prevent root from using that directory is probably a good idea.

LoadModule userdir_module /usr/lib/apache2/modules/
<IfModule mod_userdir.c>
        UserDir public_html
        UserDir disabled root

        <Directory /home/*/public_html>
                AllowOverride FileInfo AuthConfig Limit Indexes
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
                <Limit GET POST OPTIONS>
                        Order allow,deny
                        Allow from all
                <LimitExcept GET POST OPTIONS>
                        Order deny,allow
                        Deny from all
share|improve this answer

Your Answer


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.