PDA

View Full Version : Userdir support


priestjim
07-01-2009, 06:54 AM
Hi!

I would like to ask in what level is there UserDir support in LS (4.0.5), considering we are using exclusively Apache-style (Plesk) vhosts. Declaring the following in /etc/httpd/httpd.conf and visiting http://server ip/~user/info.php gives a 403 forbidden error:

<IfModule mod_userdir.c>
UserDir enabled
UserDir disabled root bin daemon adm lp sync shutdown halt mail news uucp operator games gopher ftp nobody dbus vcsa mysql nscd ntp rpm haldaemon named dovecot apache sshd rpc postfix postgres mailnull smmsp mailman webalizer pcap alias qmaild qmaill qmailp qmailq qmailr qmails popuser psaftp psaadm
UserDir "/var/www/vhosts/~*/httpdocs"
</IfModule>

Thanks!

mistwang
07-02-2009, 12:33 AM
Is this in default httpd.conf from plesk? Or you add them?

UserDir "/var/www/vhosts/~*/httpdocs"
looks strange, I think
UserDir "/var/www/vhosts/*/httpdocs"

makes more sense, unless there are directories name starting with "~" under "/var/www/vhosts/"

priestjim
07-02-2009, 04:13 AM
Yes, you are correct but the configuration is inherently flawed (as /var/www/vhosts/*/httpdocs would translate to /var/www/vhosts/user/httpdocs not /var/www/vhosts/domain/httpdocs which is the correct form). So I changed it to simply "httpdocs", as all Plesks's users home directories are their /var/www/vhosts/domain so this shoud translate http://ip/~user to /var/www/vhosts/domain/httpdocs entries BUT it's still a no-go. Debug logging gives me nothing...

mistwang
07-02-2009, 11:16 PM
UserDir httpdocs should work, please PM me the debug log.
You still get 403 error?
Try disable "UserDir disable ..." temporarily see if it help or not.

If the uid of the server is lower than "Minimum UID" configured in "Server"->"Security" tab, it will return 403.

priestjim
07-06-2009, 08:28 AM
Is this supposed to be entered inside a virtual host directive? I am using it directly inside the main httpd.conf file.

mistwang
07-06-2009, 08:51 AM
Yes, inside virtual host section. if used inside the main httpd.conf, it will be default apply to all vhosts.

priestjim
07-07-2009, 08:06 AM
Added it in a vhost, works now. Thank you!