LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to host ~users in apache? (https://www.linuxquestions.org/questions/linux-server-73/how-to-host-%7Eusers-in-apache-535842/)

anwar 03-08-2007 08:18 PM

How to host ~users in apache?
 
Hi! I've installed the stock apache from my slackware 11 dvd.

I just want to know how do I host users so that each of them has their own directory serving webpages.

e.g. http://localhost/~user

Thanks! :)

sn68 03-08-2007 09:12 PM

You can use virtualhost directive to do so
http://httpd.apache.org/docs/1.3/vhosts/examples.html

digen 03-08-2007 10:18 PM

You will need to make sure Apache is compiled with mod_userdir. Check the httpd.conf and search for mod_userdir. There should be a AddModule and LoadModule for mod_userdir.

Then check the section

Quote:

# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
Restart Apache if any changes have been made. You should then be able to access the user's home directory via http://domain.com/~username/

anwar 03-08-2007 10:34 PM

wow it worked!!! Thanks a lot guys! :)


All times are GMT -5. The time now is 11:45 AM.