logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Virtual Hosts and 403 error
Author
NettSite



Joined: 20 Jan 2010
Posts: 3
Location: South Africa

PostPosted: Wed 20 Jan '10 12:36    Post subject: Virtual Hosts and 403 error Reply with quote

I am an Apache newbie, and desperately need some guidance.

I have installed Apache 2.2.14 on Windows Server 2003 R2 SP2. The server is known as tafs-dc.transpaco.co.za on the intranet, and mail.transpaco.za.net on the internet. Both URL's should serve the same PHP application. In addition, for software licensing reasons, the server must be accesible in the intranet as "tafs-dc" - without the domain name.

Relevant bits of httpd.conf are:

Listen 80

ServerName tafs-dc.transpaco.co.za:80

DocumentRoot "E:/NettSite/Server/Apache/2.2.14/htdocs"

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

<Directory "E:/NettSite/Server/Apache/2.2.14/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>

<Directory "E:/NettSite/Server/Apache/2.2.14/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

<Directory "E:/NettSite/Server/PHP/5.3.1">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "E:/NettSite/Server/Apache/2.2.14/htdocs"
ServerName tafs-dc.transpaco.co.za
ServerAlias tafs-dc
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "E:/NettSite/Server/Apache/2.2.14/htdocs"
ServerName mail.transpaco.za.net
</VirtualHost>

The server only works as expected from tafs-dc.transpaco.co.za - tafs-dc or mail.transpaco.za.net produces a 403 not authorised error.

Additionally, the IP address on the intranet is 192.168.0.2, and on the internet it is 41.208.20.27. The server responds as expected to 192.168.0.2, but 41.208.20.27 produces a 403 error.

Pinging tafs-dc or tafs-dc.transpaco.co.za, or mail.transpaco.za.net, all test to 41.208.20.27 - from the server's command prompt.

The error log reports:

[Wed Jan 20 11:07:20 2010] [error] [client 192.168.0.2] File does not exist: E:/NettSite/Server/Apache/2.2.14/htdocs/SimpleAuthWebService

Any help will be deeply appreciated.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 20 Jan '10 14:46    Post subject: Reply with quote

Do you use a router to connect to the internet?

Cause when I use the IP to connect I see an IIS error page. A short port scan on port 80 confirmed that.

So if you use a router make sure that the portforwarding the pointing to the right server.

In the intranet it seems that the clients (your ping test showed it) resolve the external IP instead of the internal IP. So I think it is the same error as from the internet.
Back to top
NettSite



Joined: 20 Jan 2010
Posts: 3
Location: South Africa

PostPosted: Wed 20 Jan '10 15:10    Post subject: Reply with quote

Very strange - the server does not even have IIS installed - the reason for using Apache is in fact that the normal support team have given up trying to install IIS on it!

But I do think there may be something strange in the routing environment, you may very well have something there. I will follow that up with the network guys.
Back to top
NettSite



Joined: 20 Jan 2010
Posts: 3
Location: South Africa

PostPosted: Thu 21 Jan '10 11:05    Post subject: Reply with quote

Thanks for the help - problem solved. The issue was definitely IP address realted - the network adaptors were bound to the incorrect addresses.
Back to top


Reply to topic   Topic: Virtual Hosts and 403 error View previous topic :: View next topic
Post new topic   Forum Index -> Apache