PDA

View Full Version : Apache & Serving web pages from user's home directories


TheOlster
10th May 2006, 10:55 AM
This has been something that has been bothering me for ages, since FC3 in fact. I want to serve web pages from the user's home directories. With FC3, FC4 & FC5 I have always used Stanton Finley's Installation Notes (for FC5 http://stanton-finley.net/fedora_core_5_installation_notes.html#Web ) to configure Apache, PHP, MySQL, FTP, etc... but I just don't get it.

There are two potential issues that I may have here:

I have not set up the /etc/httpd/conf/httpd.conf file properly, although I have been careful to follow SF's notes.
I do not understand how to implement the structure of the website?!

So this leads me to ask where I am going wrong... here is the relevant part of /etc/httpd/conf/httpd.conf<IfModule mod_userdir.c>
#UserDir disable
UserDir public_html
</IfModule>

<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
But it could also be where the files are... I have one file in the shared folders here: /home/theolster/public_html/index.html and the folder /var/www/html is empty. When I direct firefox to 127.0.0.1 all I get is the default apache page, should I not see the index.html file?

Any help on this would be greatly appreciated as I'm probably just being dumb...

jowah
10th May 2006, 11:17 AM
But it could also be where the files are... I have one file in the shared folders here: /home/theolster/public_html/index.html and the folder /var/www/html is empty. When I direct firefox to 127.0.0.1 all I get is the default apache page, should I not see the index.html file?No, the URL http://127.0.0.1/ will still look for web files in the web server's DocumentRoot (/var/www/html). This is why you still get the default apache page. In order to view web content in users' public_html folders, you use URL:s of the form
http://127.0.0.1/~username/As an example, with the user name theolster, you'd use http://127.0.0.1/~theolster/ in order to view /home/theolster/public_html/index.html .

TheOlster
10th May 2006, 11:53 AM

Many thanks JOWAH - see I told you I was being dumb! It's always the really simple things that handicap me.