Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jan 23, 2004 12:04 pm 
Offline
Junior Member

Joined: Wed Jan 14, 2004 9:55 am
Posts: 44
Well I think I'm close, but I have 2 domains that I am trying to get to work with apache on my linode. The first domain works fine, but the second domain is getting 403 Forbidden errors. I have tried chown to apache and chmod all seems fine in that area, path exists and has an index.html file etc.

Here are my settings:

Code:
NameVirtualHost 64.5.53.200

<VirtualHost 64.5.53.200>   
ServerName garzsbarg.com
ServerAlias *.garzsbarg.com garzsbarg.com
ServerPath /home/httpd
DocumentRoot /home/httpd/htdocs
</VirtualHost>

<VirtualHost 64.5.53.200>
ServerName firestormers.com
ServerAlias *.firestormers.com firestormers.com
ServerPath /home/fs
DocumentRoot /home/fs/htdocs
</VirtualHost>


Anyone have any ideas?


Top
   
 Post subject:
PostPosted: Fri Jan 23, 2004 12:26 pm 
Offline
Junior Member

Joined: Wed Jan 14, 2004 9:55 am
Posts: 44
Update, it seems I can only get it to work if it is a path somewhere past /home/httpd/htdocs

i.e i cant use /home and add its own dir there.


Top
   
 Post subject:
PostPosted: Fri Jan 23, 2004 12:35 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
For what you're trying to do, /home should be set world rx, or at least rx with the user Apache runs as.

What are the permissions on /home and /home/fs?

-Chris


Top
   
 Post subject:
PostPosted: Fri Jan 23, 2004 1:48 pm 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
Also have you set-up the Directory settings in the httpd.conf file
for the /home directory etc

The /home/httpd/htdocs is set-up by default.

Adam


Top
   
 Post subject:
PostPosted: Sat Jan 24, 2004 11:30 am 
Offline
Senior Member

Joined: Sun Jul 20, 2003 8:29 am
Posts: 100
Website: http://www.ipo-australia.com
Location: Tropical Queensland, Australia
Quote:
Update, it seems I can only get it to work if it is a path somewhere past /home/httpd/htdocs

i.e i cant use /home and add its own dir there.


You need to add an additional <directory> section with the path.

Apache is careful with which (sub)directories you can put your documents in.


Top
   
PostPosted: Tue Feb 17, 2004 10:48 am 
Offline
Senior Member

Joined: Sun Nov 02, 2003 2:05 pm
Posts: 58
chmod go+x
chmod 2755
chmod 755


Top
   
 Post subject:
PostPosted: Fri Jul 23, 2004 5:58 pm 
Offline
Senior Newbie

Joined: Fri Jul 23, 2004 7:45 am
Posts: 14
Check your httpd.conf and make sure there's a section like

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>


This will allow apache to use any directory as it's DocumentRoot, By default it's there.

Next, make sure that the directory you're using is accessible by httpd user.
You could su - <httpd_user> and go that directory to make sure it's readable.
If you get "this account is disabled" message, chances are that user has /sbin/nologin shell. Do a "usermod -s /bin/bash <httpd_user>" first.


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2004 6:00 am 
Offline
Senior Member

Joined: Fri Feb 13, 2004 11:30 am
Posts: 140
Location: England, UK
What I normally do is nest the <Directory> parts inside the <VirtualHost> parts, which is slightly more secure than doing it in the main part of httpd.conf.

For example, I might do something like this for a typical domain:

Code:
NameVirtualHost 12.34.56.78:80

<VirtualHost 12.34.56.78:80>
  ServerName some.domain.com
  DocumentRoot /home/someuser/public_html
  User someuser
  Group someuser
  ErrorLog /home/someuser/logs/error_log
  CustomLog /home/someuser/logs/access_log combined
  <Directory "/home/someuser/public_html">
    Options -Indexes ExecCGI
    AllowOverride all
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

Hope this helps. :)


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2004 3:19 pm 
Offline
Junior Member

Joined: Wed Jan 14, 2004 9:55 am
Posts: 44
Sorry hehe got this fixed a long time ago ;)


Top
   
 Post subject:
PostPosted: Wed Jul 28, 2004 4:38 pm 
Offline
Senior Member

Joined: Fri Feb 13, 2004 11:30 am
Posts: 140
Location: England, UK
Ooo, I didn't notice the thread date properly. The month began with J and the year was 2004, so my brain read it as July. :D Anyway, you (or someone else) might find that layout helpful anyway. :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group