0

So I'm trying to set up a full LAMP for a friends computer, and everything seems fine with the installation, I just can't get apache to find the user's ~/public_html directory. Entering localhost, for just the /var/www directory or whatever works fine, I get the success message, but entering localhost/~user gives me a 404. Here's the line I added in the apache2.conf file...

239 # Add user directory public_html
240 UserDir public_html

...and here's the /etc/apach2/mods-enabled/userdir.conf file....

  1 <IfModule mod_userdir.c>
  2         UserDir public_html
  3         UserDir disabled root
  4 
  5         <Directory /home/*/public_html>
  6                 AllowOverride FileInfo AuthConfig Limit Indexes
  7                 Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoEx    ec
  8                 <Limit GET POST OPTIONS>
  9                         Order allow,deny
 10                         Allow from all
 11                 </Limit>
 12                 <LimitExcept GET POST OPTIONS>
 13                         Order deny,allow
 14                         Deny from all
 15                 </LimitExcept>
 16         </Directory>
 17 </IfModule>
 18 

He's running ubuntu 12.04

~

Álvaro González
  • 142,137
  • 41
  • 261
  • 360

1 Answers1

0

First guess: maybe mod_userdir is not actually loaded. then your config will not have any effect.

Look for a line like

LoadModule userdir_module libexec/apache2/mod_userdir.so

in your config

bjelli
  • 9,752
  • 4
  • 35
  • 50