Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Server Platforms
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Server Platforms
Discussion regarding any server based ubuntu release.

 
Thread Tools Display Modes
Old February 28th, 2005   #1
charlie763
A Carafe of Ubuntu
 
charlie763's Avatar
 
Join Date: Feb 2005
Beans: 85
Apache and public_html

I am running Ubuntu on my 12" Al Powerbook with apache installed and running. When I go to http://127.0.0.1 I get shown the directory contents of Apache's root directory. When I go to http://127.0.0.1/~[User Name]/ I want Apache to properly handle the contents of /home/[User Name]/public_html/. I have tried to figure the apache2.conf file, but nothing seemes to be working. I also restarted the server each time I saved a change to apache2.conf. Does anyone know how I can go about fixing this. Much thanks...
charlie763 is offline   Reply With Quote
Old February 28th, 2005   #2
jdonnell
Gee! These Aren't Roasted!
 
Join Date: Feb 2005
Beans: 185
Re: Apache and public_html

I replied to your post in the other category. It should help you. Let me know if you have any further questions.
jdonnell is offline   Reply With Quote
Old March 1st, 2005   #3
charlie763
A Carafe of Ubuntu
 
charlie763's Avatar
 
Join Date: Feb 2005
Beans: 85
Re: Apache and public_html

Quoted:
You should see something like this in your apache2.conf
Code:
# UserDir is now a module
#UserDir public_html
#UserDir disabled root

#<Directory /home/*/public_html>
#       AllowOverride FileInfo AuthConfig Limit
#       Options Indexes SymLinksIfOwnerMatch IncludesNoExec
#</Directory>
Change it to this.
Code:
# UserDir is now a module
UserDir public_html
#UserDir disabled root

<Directory /home/*/public_html>
       AllowOverride FileInfo AuthConfig Limit
       Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
Now restart apache and all should be working. You may need to change the permissions of your home folder.

$ chmod 755 /home/username
It looks like that should work. I'll try it when I get home tonight. I imagine that "UserDir disabled root" disables the public_html directory for the root user. What I had been doing was removing the comment tag on the "UserDir disabled root" line to make my code look as follows:
Code:
# UserDir is now a module
UserDir public_html
UserDir disabled root

<Directory /home/*/public_html>
       AllowOverride FileInfo AuthConfig Limit
       Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
The permissions on /home/charles/public_html was set so owner, group and others could read and execute, but only the owner could write. I don't think changing the permissions on /home/charles should not matter as long as /home/charles/public_html is readable. I changed the permissions of /home/charles/public_html before and it did not work.

I'll modify the apache2.conf file exactly the same way you said and report back tomorrow. Thanks for all you help. I love help forums.
charlie763 is offline   Reply With Quote
Old March 2nd, 2005   #4
charlie763
A Carafe of Ubuntu
 
charlie763's Avatar
 
Join Date: Feb 2005
Beans: 85
Re: Apache and public_html

I did exactly what you said and it did not work. I even saved the changes to apache2.conf and rebooted to see if that worked and it didn't.

I'm the only one who will be using my computer so using the default apache directory is no big deal. Thanks anyway for the help, but I think I'll just use the default directory until Hoary final comes out and I can do a fresh install.

Cheers!
charlie763 is offline   Reply With Quote
Old March 2nd, 2005   #5
jdonnell
Gee! These Aren't Roasted!
 
Join Date: Feb 2005
Beans: 185
Re: Apache and public_html

Hm, well if you want to mess with it I'll help. Messing with things like this is how I learned how apache works

If you want, do this.
Request a page from your public_html directory.
http://localhost/~user/something.html
What does it say?
Look in the log files and see what they show for this requiest.
tail /var/log/apache2/access.log
tail /var/log/apache2/error.log
jdonnell is offline   Reply With Quote
Old March 2nd, 2005   #6
hantsy
5 Cups of Ubuntu
 
Join Date: Jan 2005
Beans: 27
Re: Apache and public_html

Quote:
Originally Posted by jdonnell
Hm, well if you want to mess with it I'll help. Messing with things like this is how I learned how apache works

If you want, do this.
Request a page from your public_html directory.
http://localhost/~user/something.html
What does it say?
Look in the log files and see what they show for this requiest.
tail /var/log/apache2/access.log
tail /var/log/apache2/error.log
debian apache has its own configuer rule ...
#a2enmod user_dir
#chmod 755 /home/<username>
#mkdir -p /home/<username>/public_html
#chmod 755 /home/<username>/public_html

All is OK
hantsy is offline   Reply With Quote
Old February 11th, 2006   #7
Glarbl_Blarbl
First Cup of Ubuntu
 
Join Date: Feb 2006
Location: Washington State, USA
Beans: 12
Ubuntu 8.10 Intrepid Ibex
Re: Apache and public_html

Personally, I don't like to have my homedir world-readable... I'd amend that to:

#chmod 751 /home/<username>

cheers!
Glarbl_Blarbl is offline   Reply With Quote
Old February 23rd, 2006   #8
denisesballs
Way Too Much Ubuntu
 
denisesballs's Avatar
 
Join Date: Jun 2005
Location: Buffalo, NY
Beans: 152
Ubuntu Breezy 5.10
Send a message via AIM to denisesballs Send a message via Yahoo to denisesballs
Re: Apache and public_html

Has anyone found the user_dir apache module in dapper anywhere?
__________________
Jesse Jarzynka
http://www.jessejoe.com/
denisesballs is offline   Reply With Quote
Old February 23rd, 2006   #9
tbrownaw
5 Cups of Ubuntu
 
Join Date: Aug 2005
Beans: 26
Re: Apache and public_html

Quote:
Originally Posted by denisesballs
Has anyone found the user_dir apache module in dapper anywhere?
I think it's in apache2-common?
__________________
tbrownaw is offline   Reply With Quote
Old February 23rd, 2006   #10
LordHunter317
Tall Cafè Ubuntu
 
Join Date: Nov 2004
Beans: 2,614
Re: Apache and public_html

No, it's part of the mpm you have installed. However, it's part of the standard installation.
LordHunter317 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:45 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry