Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache Virtual Host 403

Status
Not open for further replies.

kabuto501

MIS
Jun 4, 2005
1
NL
Hi everyone,

I will admit immediately; I feel bad for starting this new thread immediately after joining. it's just that I have spent several nights at one stupid problem now, and I am really really starting to get desperate. badly. I want to run apache on Mandriva LE 2005, but there is this god-awful problem with virtual hosts. let me explain:

everything works fine without virtual hosts set, no problem here. I go to and I get the standard page.

now, I open Vhosts.conf and add this:

NameVirtualHost 10.0.0.156
<VirtualHost 10.0.0.156>
ServerName localhost
DocumentRoot /var/</VirtualHost>

I set the permissions EXACTLY the same for that folder as for /var/ I type the following at the command prompt (as root):

apachectl restart

what do I expect to see? the contents of /var/ when browsing to and the contents of the standard page when going to . what do I get? the standard content when going to and a 403 when going to . This is the point where I get stuck. I have tried countless options, added quotation marks, lots of values, changed IP adresses, tried with external IP-adresses, it all didn't work out. there was one thing that made it even worse;

NameVirtualHost *
<VirtualHost *>
ServerName localhost
DocumentRoot /var/</VirtualHost>

with these settings, not only does exactly the same as before happen, but now the server also only accepts ssl connections. on all pages. it works, after accepting the certificate, but I find this weird as hell.

I am really sorry if I overlooked something really stupid... I have been at this for several hours straight, several nights long (no kidding, it's true) now, so I can't see it all clear anymore... -_-"

I would really appreciate you guys' help.

Thanx alot in advance,
- kabuto
 
kabuto501 said:
NameVirtualHost *
<VirtualHost *>
ServerName localhost
DocumentRoot /var/</VirtualHost>

This should work for requests originating from your server. Requests to 10.0.0.156 should not work as the ServerName directive takes a fully qualified domain name for a value, rather than an IP address.

You may want to set up a default VirtualHost.


Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top