Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 27th, 2002, 04:28 AM
westam westam is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Winchester, UK
Posts: 5 westam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy 403 on second virtual host

I have a problem accessing anything on a second virtual host. I can access the first virtual host ok. There are no messages in access_log or error_log. The dir permissions seem ok, ie I can view and navigate to the documentroot directory from an ordinary id. My httpd.conf is attached. Any help much appreciated, Martin West
Attached Files
File Type: zip amwconf.zip (12.6 KB, 183 views)

Last edited by westam : January 27th, 2002 at 04:34 AM.

Reply With Quote
  #2  
Old January 27th, 2002, 05:03 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
1) UseCanonicalName On -> UseCanonicalName Off. This is almost always off, I still wonder why Apache teams don't set this off by default.

2) Port 8080 -> Port 80.

3) NameVirtualHost 127.0.0.1:* -> NameVirtualHost *

4)
Code:
<VirtualHost *>
  ServerName  rh1.thecla.com
  DocumentRoot /usr/local/apache/htdocs
#  ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
#  <Directory "/usr/local/apache/htdocs">
#     Options Indexes FollowSymLinks MultiViews
#     AllowOverride None
#     Order allow,deny
#     Allow from all
#  </Directory>

#  <Directory "/usr/local/apache/cgi-bin">
#     AllowOverride None
#    Options None
#     Order allow,deny
#     Allow from all
#  </Directory>
</VirtualHost>

You already defined all that globally, there is no reason to redefine them, unless you want to override them.

5)
Code:
<VirtualHost *>
  ServerName  w3.enigmatec.thecla.com
  DocumentRoot /usr/local/www/enigmatec/htdocs
  ScriptAlias /cgi-bin/ "/usr/local/www/enigmatec/cgi-bin/"
  ErrorDocument 403 "*** Access Problem ***"
#  <Directory "/usr/local/www/enigmatec/htdocs">
#     Options Indexes FollowSymLinks MultiViews
#     AllowOverride All
#     Order allow,deny
#     Allow from all
#  </Directory>

#  <Directory "/usr/local/www/enigmatec/cgi-bin">
#     AllowOverride None
#     Options None
#     Order allow,deny
#     Allow from all
#  </Directory>
</VirtualHost>


6) Make sure you can ping both ServerName (by name) and they must resolve to the same IP.

Reply With Quote
  #3  
Old January 27th, 2002, 06:12 AM
westam westam is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Winchester, UK
Posts: 5 westam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks,
1) This didnt make any difference
2) I am using w3...com:8080 so this should not make any difference.
3) I want to use ip-based to use ssl when I get past this hurdle, and since I can access the first vh using rh1...com:8080 I dont think this is a problem.
4/5) Thanks, this was just a stab in the dark in numerous iterations of httpd.conf.
6) They are define in hosts against 127.0.0.1

Thanks anyway.

Reply With Quote
  #4  
Old January 27th, 2002, 06:52 AM
westam westam is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Winchester, UK
Posts: 5 westam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hmmm, the problem seems to be if I start apache from root I have the problem, if start from another id I dont, so is probably some kind of directory/permissions problem, oh my brain hurts.

Reply With Quote
  #5  
Old January 27th, 2002, 08:16 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
1) That makes a huge difference whenever you there is vhost is used.

2) Why are you using non-standard port in the first place? It would make your life easier if you follow the standard.

3) You don't need to use ip-based for SSL. THe only difference is that, you can only configure one FQDN for SSL. Right now you are not using port 80 at all. And your configuration tells me you are using Name-based entirely.

There are actually many other minor misconfigurations.

>> if I start apache from root I have the problem

When you are using port < 1024, then you need to start it from root. Port 8080 doesn't require root priviledge but 443 does.

>> if start from another id I dont

You mean you don't see the 403 on 2nd vhost?

>> probably some kind of directory/permissions

You need to make sure all those paths have Read + Execute permission to nobody so it has search access.

Reply With Quote
  #6  
Old January 27th, 2002, 12:58 PM
westam westam is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Winchester, UK
Posts: 5 westam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
1) No difference == still had the problem
2) Just practicing/testing
3) Okey doke, older and wiser, docs say need ip-based for SSL.
Have gotten as far as enabling 443.
Yes when i start as not root I dont get the 403 and my index page displays.
Thanks, will recheck all permissions, I may be missing an exec flag somewhere. I found one but there maybe another I missed.
Thanks again.

Reply With Quote
  #7  
Old January 28th, 2002, 04:18 PM
westam westam is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Winchester, UK
Posts: 5 westam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile

I changed port to 80 and made a few of the other suggested changes and it now works as required. Thanks for the help.
Now to do it on the real server.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > 403 on second virtual host


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT