0

So I am pretty new to webservers in general. I setup my own on CentOS pretty easily, but now that I am trying out Windows Server 2012 using WAMP I am having some trouble accessing the server from external computers, and other computers in my network.

I installed WAMP, and did some configuration of httpd.conf. My routers ports are forwarded already as I just had a webserver setup on this PC using the same internal IP (192.168.0.3). On the server I can go to localhost and see the site, or I can go to 192.168.0.3 and see the site. Going to the server's domain does not work. From computers within my network, going to 192.168.0.3 does not work either. Does anyone have any idea what could be causing this? I feel like there may be some incorrect configuration on the httpd.conf, so the things I changed are ...

ServerName http://[domain name removed].com

...

Listen *:80

...

<Directory />
    AllowOverride none
    Require all granted
</Directory>

Any suggestions would be great.

hurivo
  • 1
  • This may or may not help or have an answer: [Cannot access wamp server on local network](http://stackoverflow.com/questions/8219062/cannot-access-wamp-server-on-local-network) – crashmstr Apr 15 '15 at 17:54
  • @crashmstr Ah! Someone in that thread suggested it was firewall related, so I disabled my firewall completely and was able to access it. That will help narrow down the issues. Thank you :) – hurivo Apr 15 '15 at 18:09

1 Answers1

1

A few suggestions:

First the section you have changed i.e.

<Directory />
    AllowOverride none
    Require all granted
</Directory>

Is the section of httpd.conf that protects the drive that Apache is installed on. By that I mean the root of the drive Apache is installed on. You do not want to allow any access to that its a hackers delight.

So change it back to

<Directory />
    AllowOverride none
    Require all denied
</Directory>

The normal proces when securing Apache is to deny access to EVERYTHING which this now does, and then only allow access where it is required. Hence that should be a Deny.

Now assuming you have put your site in \wamp\www and not setup a Virtual Host for your site which you really should have you now need to look for the section of httpd.conf that starts with this line

<Directory "c:/wamp/www/">

In here you will see these lines

#   onlineoffline tag - don't remove
    Require local

If you change this to

#   onlineoffline tag - don't remove
    Require all granted

Then you will have granted access to any ip address, but only to your site folder and not the whole of your drive.

This could also have been achieved by using the wampmanager menu system and doing :-

wampmanager -> Put Online

Now to your change to ServerName http://[domain name removed].com

This should be the domain name but without the http:// bit so try

ServerName your-domain-name.com
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149