• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1279
  • Last Modified:

Can not access intranet site with IP address or hostname. Local host works fine (Apache)

I have installed WAMP on Windows 2003. Every thing seems to be working fine except for one thing. I can access my website with the url http://localhost/Mysite and http://127.0.0.1/mysite

When I try to use the IP (http://198.162.1.55/mysite or hostname (http://hostname/mysite) I get an error that says:

You are not authorized to view this page
You might not have permission to view this directory or page using the credentials you supplied.

I can also not access the website from any other computers on my domain but I guess that is related to the same problem that I can not use the IP or hostname.

Is there configuration that needs to be done to Apache so that I can use the Ip and host name or is this a network configuration issue? I have disabled my firewall but I have the same problem.

Thank you
0
R2-D2
Asked:
R2-D2
  • 2
2 Solutions
 
giltjrCommented:
Did you setup any virtual hosts?  Do you have any deny/allow statements?
0
 
ravenplCommented:
Definitely there must be following statement somewhere in the httpd.conf of .htaccess
Allow from localhost
Deny from all
0
 
R2-D2Author Commented:
I did not set up any virtual hosts. I have tried setting up my virtual host like this but it did not work:

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
   DocumentRoot "C:\wamp\www\mysite"
   ServerName servername.local
</VirtualHost>

I have also tried:

NameVirtualHost 192.168.1.5

<VirtualHost 192.168.1.5>
   DocumentRoot "C:\wamp\www\mysite"
   ServerName servername.local
</VirtualHost>

My httpd.conf is as follow:

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

I still get the message:

 Forbidden
You don't have permission to access / on this server.

Can you see anything that I have not configured correctly?

0
 
R2-D2Author Commented:
I have found the problem. It was like you suggested. I found the problem in the Apache deny/allow statements.

Thanks for your help!
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now