Question:
How to configure apache for home directory?
anonymous
2009-11-13 06:15:02 UTC
Just installed apache on my vps and it's configured for var/www how do i configure apache so that my index page is in the home directory? (ubuntu hardy)
Four answers:
anonymous
2009-11-13 06:49:18 UTC
Edit the /etc/apache/httpd.conf file.



Look for the following comment lines in the configuration file. If you make the UserDir lines look like the ones shown, then you will be able to create a directory named public_html in any home directory to host web page except for the root account.

#

# UserDir: The name of the directory which is appended onto a user's home

# directory if a ~user request is received.

#



UserDir /home/*/public_html

UserDir enabled *

UserDir disabled root





You would then access end user web pages with a URL reference to the end user account name like such:



http://my.servername.com/~myusername
Mark
2009-11-13 06:37:29 UTC
You enable this with the Apache userdir module. You can enable it by doing this:



$ cd /etc/apache2/mods-enabled

$ sudo ln -s /etc/apache2/mods-available/userdir.conf .

$ sudo ln -s /etc/apache2/mods-available/userdir.load .

$ sudo /etc/init.d/apache2 restart



Now create a directory called public_html in your home directory and put your files in there. Make sure it is readable by everyone so the web server process can see it:



$ chmod -R 777 ~/public_html



Then you can access your files by going to http://localhost/~username where username is whatever your Ubuntu username is (type "whoami" in a terminal if you're not sure).



If you want to do this but don't want to have to have the ~username in the URL you can edit /etc/apache2/sites-available/000-default and change all instances of /var/www to /home/username/public_html, then you would see your HTML files by going to http://localhost/
?
2016-12-08 14:45:26 UTC
hi naren, residing house domicile windows 7 beta has it extremely is own drivers so appears like your utility is for a residing house domicile windows 32 utility yet regardless of this you haven't any longer have been given any greater heard my lesson on a residing house domicile windows sixty 4 to a windows32 so i admire to inform the story so setback and relax and that i might assist you realize the story of techniques all of it all started some years interior the previous on an identical time as vista improve into created alongside with it microsoft in it extremely is infinit understand-how improve into beginning up hd extreme def or yet yet another word is plasma yet there improve actual right into a controversy beating their opposition to the industry first so as that they've been given right here out with 2 residing house domicile windows sixty 4 and 32 what's the version between them the motherboards alongside with the processors yet undesirable tips dude optimal every person improve into provided in elementary terms win 32 utility yet what approximately those that had to run sixty 4 utility the geeks setup their computers to run sixty 4 on an identical time as others weren't so fortunate so microsoft found out that they had a controversy and so residing house domicile windows 7 beta is now on the industry and all is happy back regardless of the shown actuality that anybody has the undesirable strategies of vista yet residing house domicile windows 7 beta has their own drivers and you will run which ever which you like. good success choose i improve into helpful to you
Nigel
2009-11-13 06:21:28 UTC
You should probably read http://www.linuxquestions.org/questions/linux-newbie-8/apache-roothome-directory-and-setting-up-ftp-for-home-directories-197594/, seems to be exactly the same as your asking.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...