1

Config:

OS-> Win 7 x64
Wamp server versions-> wampserver2.2e - php5.4.3 - httpd-2.4.2 - mysql5.5.24
Skype is not installed. Port 80 is available.
hosts file has the lines-> 
127.0.0.1       localhost
::1             localhost
httpd.conf file has the required value `Require all granted` in  #onlineoffline tag

Issue:

I need to put my server online (yes I understand the risks but this is a temporary thing that I need to do). I also understand that similar questions have been posted and I have gone through almost all of the them and their solutions (you will find out below).

Problem statement: Wamp icon is Green. Status shows as Online. Everything woks without any hassles using localhost. But the moment I use my public IP I get page cannot be displayed. I have checked the access logs and there doesnt seem to be any log for the time I attempt the access.

Solutions tried: (i guess everything)

  • With router I have tried with port forwarding. I have also tried without using the router.
  • Tried with Firewall enabled and disabled.
  • Tried the "allow" lines.
  • Tried install/remove/restart of Apache service
  • Tried changing localhost:80 to <ip>:80
  • Tried multiple online/offline toggles
  • Tried installing 32 bit variant of version 2.5
  • Tried installing 64 but variant of version 2.5
  • Tried playing with the spaces before the Require all granted code (from none to 2)

Note

Everything used to work in my previous installation of Windows. Post re-installing I can't remember for the life of me the settings I changed to get it to work. I had the backup but that I deleted the moment I saw the green icon (foolish me !). I must have read countless solutions but I'm currently stuck like this person (wamp server forum). Would really really appreciate if anyone could help me resolve this.

Additional info:

<Directory "c:/wamp/www/"> 
    Options Indexes FollowSymLinks 
    AllowOverride All 
    # onlineoffline tag - don't remove
    Require all granted 
</Directory> 
schizovivek
  • 83
  • 1
  • 1
  • 8
  • Show your `https.conf` file around the `#onlineoffline tag` section please. – RiggsFolly Sep 20 '14 at 13:58
  • @RiggsFolly Options Indexes FollowSymLinks AllowOverride All # Online --> Require all granted # onlineoffline tag - don't remove Require all granted – schizovivek Sep 20 '14 at 18:06
  • Look ok assuming your site is in the `www` folder. Are you sure you have Port Forwarded to the correct internal IP address? Also are you sure that the PC running WAMPServer is on a static IP address? – RiggsFolly Sep 22 '14 at 09:10
  • the ports are forwarded correctly.. the site is under the www folder. the setup used to work before. the only things changed were OS, wamp setup. regarding static IP, my connection has a dynamic IP but the IP assigned stays until a re-connection. What I did now was speak to the tech dept of the ISP. the technician told me that the issue was due to IPv6 IPs being assigned. For proof he assigned a static IPv4 IP to my machine and the website worked online. Is this a possible issue? If so can it be resolved without me having to get a static IP? – schizovivek Sep 24 '14 at 06:24

3 Answers3

2

A simple step it will work:

edit httpd-vhosts.conf

Change the following property: Require all granted

Now restart all services and access your box from the outside.

Unheilig
  • 16,196
  • 193
  • 68
  • 98
Ranjit
  • 135
  • 7
-1

Re: Static IP. That comment was supposed to mean that Your PC running the WAMPServer i.e. Apache should have a static IP, so that when you reboot your PC or your router it always gets the same IP address so that the Port Forwarding from your router to your webserver PC always remains the same and therefore the port forwarding always forwards to the correct PC inside your internal network.

In this section:

<Directory "c:/wamp/www/"> 
    Options Indexes FollowSymLinks 
    AllowOverride All 
    Require all granted 
    # onlineoffline tag - don't remove
    Require all granted 
</Directory> 

You have this statement Require all granted occuring twice, you only need it once.

Apache 2.4.2 is IPV6 aware so it should be quite happy accepting connections in the IPV6 range.

You could check your Apache Listen directive, it is possible that you have something like this in the httpd.conf file

Listen 0.0.0.0:80

The 0.0.0.0 part will tell Apache to only listen on the IPV4 network. If that is the case change it to

Listen 80

So that it listens to both IPV4 and IPV6.

Or

Listen 0.0.0.0:80
Listen [::0]:80

Also does your router support IPV6? If not then any external connections from the IPV6 range will not be accepted by your router, and therefore of course those connections will not make it past your router. Check that your router is IPV6 capable and if it is that you have IPV6 turned on, if it is an optional feature!

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • hi.. apologies for the delay. had a family emergency. So I have checked the settings as you advised. Listen is set to `Listen 80`. The `Require all granted` value is set only once. The person who edited the question has updated it wrong. The last point I'm still working on. I had assumed all routers would support IPv6 by default. I am on the latest firmware of my router (TP Link 841N). Still I am checking with the companies tech support team to verify this. From what I gather I think this might be the issue (my router might not support IPv6). Would flashing dd-wrt help? – schizovivek Oct 05 '14 at 07:39
  • Latest update. Seems like my router does not support IPv6. Good news is the tech guys said that flashing dd-wrt firmware should enable IPv6 support. Going to give this a try. Thanks a lot @RiggsFolly – schizovivek Oct 10 '14 at 11:50
-1

I just put the onlineoffline tag as a comment and it worked :

#   onlineoffline tag - don't remove
 Require local

Just get past the warning and comment this one

#   onlineoffline tag - don't remove
# Require local

Optional : You can add, just to be sure

Order Allow,Deny
Allow from all

Worked for me with both.

I found the solution thanks to the link at the bottom of this post : How to allow remote access to my WAMP server for Mobile(Android) on the page : https://gist.github.com/samvaughton/6790739

Community
  • 1
  • 1