Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: log files and ssi not working with virtual hosting |
|
Author |
|
nyteshade
Joined: 10 Mar 2010 Posts: 8 Location: ohio
|
Posted: Wed 10 Mar '10 1:51 Post subject: log files and ssi not working with virtual hosting |
|
|
I just got my browser to work with my vhost setup under winXPSP3 and Apache2.2. The apache default server root works as it did prior to setting up vhosts, i.e., all my php includes and html and ssi includes work, no problem. However, the ssi and html includes in my newly created vhost directories are not showing up in the browser pages?!?! The php includes work fine. I've tried all I know which ain't much, been working with Apache/PHP/CSS/HTML/regex setup for just about 6 months. Help! Here's my httpd-vhosts.conf:
Code: |
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
Order Deny,Allow
Allow from all
</Directory>
<Directory "C:/vHosts/rcs.meinsandkasten.com/web">
Order Deny,Allow
Allow from all
</Directory>
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin rcs@live.com
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin rcs@live.com
DocumentRoot "C:/vHosts/rcs.meinsandkasten.com/web"
ServerName rcs.meinsandkasten.com
ErrorLog "logs/rcs.meinsandkasten.com-error.log"
CustomLog "logs/rcs.meinsandkasten.com-access.log" common
</VirtualHost>
|
Any help much appreciated. Peace. PS - oh yea, ALL four log files are ending up in the default server log directory. No matter what I try I can't seem to get those two rcs.meinsandkasten.com log files to go to their home! I got a feeling that if I could fix that then I'd have a handle on the 'includes' problem. Arrrg... thanking you in advance. |
|
Back to top |
|
glsmith Moderator

Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 10 Mar '10 4:31 Post subject: |
|
|
because C:/vHosts/* is a completely different place from C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/*
Directory works from that point forward.
As you've got configured, C:/vHosts/* has no nothing (Options None, AllowOverride None)
However,
<Directory "C:/vHosts">
Options Indexes Includes etc.
AllowOverride Authconfig FileInfo etc.
# No Order and Allow from here since I do not want to allow
# every single location above this directory access. Do that per-directory
# Later in config
</Directory>
with respect to Options and AllowOverride would cover the following:
C:/vHosts/rcs.meinsandkasten.com/web
C:/vHosts/some.other.hostname/web
C:/vHosts/*
except you can override if needed
<Directory "C:/vHosts/yet.another.hostname/web">
Options None
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
would force C:/vHosts/yet.another.hostname/web to now have
no SSI, no Indexes, no custom error docs, no nothing.
You would then still need to give explicit access to the actual document root
<Directory "C:/vHosts/rcs.meinsandkasten.com/web">
Order Deny,Allow
Allow from all
</Directory>
Logs;
Correct, because logs/* = Server_Root/logs/*
see the third paragraph of the comments at the top of httpd.conf |
|
Back to top |
|
nyteshade
Joined: 10 Mar 2010 Posts: 8 Location: ohio
|
Posted: Wed 10 Mar '10 11:22 Post subject: virtual hosting |
|
|
Firstly, thanks for the detailed reply. I've been up since 2:30 looking it over in tandem with the documentation at the apache website. I fixed my problem with your suggestions and here's what I did:
Code: |
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
Order Deny,Allow
Allow from all
</Directory>
<Directory "C:/vHosts/rcs.meinsandkasten.com/web">
Options Includes
AllowOverride
Order Deny,Allow
Allow from all
</Directory>
|
And, in the rcs.meinsandkasten.com/web directory I have .htaccess with:
Code: |
#disallow display of file names
options -indexes
|
I see that you've mentioned Authconfig and FileInfo but to be honest, I'm not at a comfortable level of understanding to apply those things, yet. If you know a good book on understanding Apache for windows then please feel free to share. Thanks! |
|
Back to top |
|
glsmith Moderator

Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 10 Mar '10 17:22 Post subject: |
|
|
This sums it up pretty good
http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride
As far as book ... not sure.
Apache Cookbook has probably more than an average person ever wanted to know. I've never seen it so I do not know if it is any easier/harder to understand than the documentation. |
|
Back to top |
|
nyteshade
Joined: 10 Mar 2010 Posts: 8 Location: ohio
|
Posted: Wed 10 Mar '10 22:33 Post subject: solution |
|
|
Thx again. |
|
Back to top |
|
|
|
|
|
|