|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
Last edited by westam : January 27th, 2002 at 04:34 AM. |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > 403 on second virtual host |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|