7

I have already tried port forwarding through router and also disabled my firewall. I also edited httpd.conf. There I changed

Listen 80

to

Listen 8080

I also changed ServerName from localhost:80 to <private-ip>:80 i.e 192.168.1.2:80. Finally I changed to

Order Allow,Deny
Allow from all

in offlineonline tag. I have DLink DSL-2730U. In that in advanced settings> NAT > external port start 8080 and end 8080> internal port start 8080 and end 8080>Server ip i kept as 192.168.1.2 Then restarted all the sevices i.e both router and wamp. But still i am unable to access wamp through my public ip which is 59.95.81.56.

Madhura Jayaratne
  • 2,064
  • 1
  • 12
  • 20
Mithilesh
  • 188
  • 1
  • 6
  • 17
  • Follow this tutorial [Tinkernut - Website Basics 4 - Servers](http://www.youtube.com/watch?v=cUMYcuOjfns) – Adam Azad Oct 02 '13 at 06:44
  • Nice one ! But I already know that ! too generalized ! My problem is wamp not going online – Mithilesh Oct 02 '13 at 06:55
  • Is Apache not going online ( i.e. accepting access from the web ) or it it just that the popup message does not say `server Online`. Also what version of WAMP are you running? – RiggsFolly Oct 02 '13 at 09:46
  • Version of wamp is 2.4 and yes apache is not going online – Mithilesh Oct 02 '13 at 10:20
  • Just looked at that tutorial, and this could be your problem. Most routers dont let you use the domain name you setup using something like `no-ip` from inside your own local network. They dont have the loopback feature required to do this. Have you tried accessing your site from another location i.e. a friends house. Also if you swapped the port number to 8080 then you will need to add that to the domain name address i.e. `http://xxx.yyy.com:8080` are you doing that, again you will probably have to do this from another location? – RiggsFolly Oct 02 '13 at 10:25
  • Also, is the local ip address of the PC you are running wamp on `192.168.1.2`. Find your wamp PC's ip address by running a command window on that PC and running `ipconfig`. In the first group of info displayed look for `IPV4 Address`. Thats the PC's local ip address according to your router, and that is where you should port forward to. – RiggsFolly Oct 02 '13 at 10:29
  • You are right RiggsFolly but unfortunately i have tried all that! – Mithilesh Oct 02 '13 at 11:52

3 Answers3

10

It should have been a simple case of left clicking the WAMPManager menu and clicking Put online.

What that would have done is changed this section of httpd.conf from this:

If using Apache 2.2.x

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1 ::1 localhost

To this:

#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all

If using Apache 2.4.x

#   onlineoffline tag - don't remove
    Require local

To this:

#   onlineoffline tag - don't remove
    Require all granted

And strictly thats all you should have needed to do!

But as you have done some manual messing with httpd.conf here are some things you need to check. I am assuming you wanted to change the port to 8080 rather than thinking you had to for some reason. If you didnt want to change port number to 8080 then use 80 in the following info instead of 8080. Changing to 8080 just makes life more complicated for your users, but if this is just a play site that does not really matter I suppose.

httpd.conf

# as your router probably does not support IPV6 change so apache only listens on IPV4
# you dont need to put the actual ip address of this PC in here as you say you did.

Listen 0.0.0.0:8080

# ServerName port need to match the Listen, your question made me think you may have left this as localhost:80
ServerName localhost:8080

If using Apache 2.2.x

# Assuming your site is in c:\wamp\www ( this section should already exist I just removed all the comments for brevity)
<Directory "d:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #
#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all
</Directory>

If using Apache 2.4.x

# Assuming your site is in c:\wamp\www ( this section should already exist I just removed all the comments for brevity)
<Directory "d:/wamp/www/">
    Options Indexes FollowSymLinks
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #
#   onlineoffline tag - don't remove
    Require from all
</Directory>

If you made the common mistake of changing this section, change it back to this, or you will be giving access to your C:\ to anybody.

If using Apache 2.2.x

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

If using Apache 2.4.x

<Directory />
    Options FollowSymLinks
    Require all denied
</Directory>

I hope something in here makes you stumble upon your mistake or ommission.

EDIT: Additional info

phpMyAdmin is protected from prying eyes like this:

edit c:\wamp\alias\phpmyadmin.conf

Alias /phpmyadmin "d:/wamp/apps/phpmyadmin3.5.1/"

# to give access to phpmyadmin from outside
# replace the lines
#
#        Order Deny,Allow
#   Deny from all
#   Allow from 127.0.0.1
#
# by
#
#        Order Allow,Deny
#   Allow from all
#

<Directory "d:/wamp/apps/phpmyadmin3.5.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
</Directory>

See the line Allow from 127.0.0.1 that stops anyone not on the same PC as the database using it.

So if you are trying to access that from the internet, it wont work.

I suppose you could TEMPORARILY change it to :

Order Allow,Deny
Allow from all

Or better still if you know the ip address of where you are going to test it from you coudl do

Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1 localhost
Allow from xxx.yyy.zzz.aaa

Where xxx.yyy.zzz.aaa is your friends IP address.

RiggsFolly
  • 83,545
  • 20
  • 96
  • 136
0

I got the answer at here.

The part I missed in other solution was the Configurtion below:

Configuring the server to be reachable by everyone

The last step! Open your httpd.conf and find this line:

ServerName localhost:80

Change it to:

ServerName <your private IP>:80

Example:

ServerName 192.168.1.27:80
Kourosh
  • 29
  • 1
0

Additionally to RiggsFolly's answer you can open a port in your firewall instead of disabeling it.

The Firewall protects you from many things and disabeling it will make your computer much more vulnerable to hacks

Open port in Windows Firewall

Fi Ras
  • 741
  • 9
  • 24