PDA

View Full Version : How to enable userdir?


blueface
10-25-2007, 07:27 PM
I'd like to enable userdir so users on shared IP can access their accounts by going to http://<ip>/~username

I followed the example in this docs and setup it as Static Context with no luck:
http://www.litespeedtech.com/docs/webserver/config/context/?hilite=userdir,

exp: ^/~([A-Za-z0-9]+)(.*)
location: /home/$1/www$2
accessible: yes
other options are not set

This is plain Centos server and I'm using Virtual Host templates to host these domains on the same shared IP.

What am I doing wrong?

mistwang
10-25-2007, 08:24 PM
Which virtual host is reached when access the server with <IP>?
You need to configure a virtual host serve that and add context there. Using "/home/" as document root.

blueface
10-25-2007, 09:29 PM
I'm using vhost template and used the Context menu tab there.

It's giving me 404 error when going to http://<ip>/~username

mistwang
10-26-2007, 09:34 AM
You need to explicitly add the IP address as one of the domain alias for that vhost configured through the template.

turn on debug logging, and check which vhost is serving the request, which directory it is looking for.

blueface
10-26-2007, 04:21 PM
Thanks, it worked! :)
You really need to put that info in the docs or make it much easier, instead of defining the IP explicitly for each vhost template.

blueface
10-27-2007, 12:05 AM
Hmm wait, after I add the IP on domain aliases for each vhost template, I now see lots of these errors:

Hostname [ip] on listener [ip:80] is mapped to virtual host [xxx], can't map to virtual host [yyy]!

How do I get rid of these errors?

blueface
10-28-2007, 12:17 PM
Ok I figured it out. I only need to add the IP to the domain alias once, not for every vhost. All is good now :)