weird wampserver ip/port conflict - apache

Ok, here is my problem:
I am runing WampServer 2.5 on my windows 7 Home Premium PC and I have a TP-Link TL-WR642G v2 router updated to the latest official firmware (download site). I have forwarded port 80 to my pc (ip 192.168.1.111, static) and disabled all the firewalls (see images). When i turn on WAMP, and enter localhost or 127.0.0.1 or 192.168.1.111 or even my wan ip (93.103.90.XXX) everything connects and I get my test html page but when I enter my wan ip on any machine that is not connected to my router the page doesn't load - i don't even get 403 forbidden (and yes my wamp says server online an i have edited the httpd.conf). Also http://www.yougetsignal.com/tools/open-ports/ and http://www.whatsmyip.org/port-scanner/ say port 80 is closed/timed out. Everything worked fine a week ago and i could access my server from anywhere with my public ip. I also tried other ports but i get the same thing, tried WAMP 2.4 with no success. All i did from last week was downgrade from Ultimate to Home Premium and install the drivers of course (but I guess that has no effect) and upgraded my router firmware (linked above). Any idea why it doesn't work? Does anyone have the older firmware, so I can try downgrading to it?
Thank you for reading, David :O

If you haven't done so already; then change the Management port of the Router to something other than port 80. That way you aren't conflicting with the WampServer. This is more than likely the issue.
You shouldn't have to change anything in the Firewall as Virtual Servers will set a rule to allow the packets.
As a test can you try to open up other ports on your computer like SSH or Telnet. If you find the that forwarding settings work to these protocols then you know the issue is not with the Router or ISP, but with a firewall setting on the Computer.
You can use this site to see if your ports are open (if you are on the LAN): http://www.canyouseeme.org/

Related

Cannot access http server (apache2 on Webmin) from WAN

I've already opened the port 80. It worked perfectly, but after some changes it left working. Webmin runs on a Raspberry Pi with Raspbian.
1. I tried to solve an ip issue, because my router changed my ip so quick that I had to update my ip on my Webmin server every time it changed.
img1
2. So I decided to change the ip to 127.0.0.1 in all of my servers. Like this:
img2
3. Then, cause now I could't access to my server from outside of my LAN. I tried to reset my eth0 ip again as it was in all of my servers (as 192.168.1.89), but it didn't work. I still can't access my http from outside.
4. I waited my eth0 ip to change to update it again (to put it instead of 127.0.0.1), but didn't work. I tried to do it like this: img3
As I said, it worked perfectly before changing the ip to 127.0.0.1, because my normal ip changes too fast (every 7 or 10 mins). I can access to my http server but only from my LAN.
Well, finally I found the solution. The problem was nothing about my Apache or Webmin configuration. It was about a problem with my router. Apparently it had a bug: The DMZ seemed as activated, but it really didn't (my router is a HUAWEI HG659).
Also, if you get this kind of problem, you should first check what ports are being used by your computer, and check if you have any firewall or program blocking that port.

Wampserver 3.0.6 cannot be reached by outside devices

After installing wampserver 3.0.6 on windows 8, it would seem that I cannot reach it from another pc or phone (they're connected with the same network). The message displayed in the navigator when trying to reach the server from another device (reach by typing the ipv4 adress in the navigator) is :
This site can’t be reached
192.168.x.x took too long to respond.
not the Forbidden : access denied window !
I solved this problem by allowing port 80 or any port that you use in firewall.
Open Windows Firewall
New Inbound Rules
Choose Port option, click next
Choose TCP, Specific local ports: 80
Finished.
Link: Can't access WAMP site from the web with IP

WAMP localhost redirects to my IP

I had to recently wipe my PC and I'm setting up my development environment again using WAMP.
After installing WAMP, if I visit http://localhost instead of seeing the WAMP homepage I get redirected to http://x.x.x.x, where x.x.x.x is my IP.
I had this issue on another PC and after setting the inbound rules for Apache HTTP Server in my Windows Firewall settings to allow all domains it fixed the issue. I applied this to my PC, and the issue does not seem to be present for Internet Explorer, whereas for Chrome and Firefox the localhost to my IP redirect issue persists even after clearing the cache for each browser.
My C:\Windows\System32\drivers\etc\hosts file looks like this:
127.0.0.1 localhost
::1 localhost
and my firewall rules look like this:
I am not currently using vhosts and I'm on a network at my workplace (if that has any implications?)
I also encountered the same issue when using Laragon which uses vhosts and whenever I visited a virtual host, e.g. mysite.dev it didn't work properly either.
My question on the Laragon forum: https://forum.laragon.org/topic/126/accessing-mysite-dev-redirects-to-url-which-shows-index-php-at-root-folder/3
The Problem
I'm behind a proxy which is used for browsing the web at my workplace. The proxy seemed to be messing up the dns resolution whenever I made a call to localhost (when using wamp) or one of my vhosts (when using Laragon).
This was clear as when I ran the following from the command line: ping site.dev I was getting the expected response from 127.0.0.1. However, when going to site.dev in my browser I was getting redirected to my IP, so essentially my etc/hosts file was being ignored for dns resolution.
The difference between the two being that the browser is using the proxy whereas the command line isn't!
The Solution
After trying many different solutions which seemed to work for localhost (on wamp) only, but not vhosts (on Laragon) I finally got to the solution which was actually so simple!
So, for chrome I simply went to chrome://settings/ > Network - Change proxy settings > LAN Settings > Proxy Server - Advanced
Then in the Exceptions text box I added the following:
*.dev;localhost;127.0.0.1
Here's a screenshot of my settings from Chrome/Internet Options
And that did the trick! Hope this can help someone else.

Accessing apache2.4 server through WiFi / WLAN inside home network

I have netgear 1500 wifi DSL router having private IP 192.168.1.1. I am running apache 2.4 in my desktop PC having IP 192.168.1.2 and my laptop has an IP 192.168.1.3. While I try to access the apache server as http://192.168.1.2:80/index.html I get a message requested URL /index.html not found, while it shows up properly when I access is as localhost.
I have done port forwarding for port:80 and firewalls are stopped.
I have quickheal running in the same machine in which apache runs. Both machines are windows.
What do I need to do so that I can access the server from my laptop?
I have added the privileges through http.conf also.
I see another problem - when I ping the desktop machine, which runs the server, the request is timed out.
Thanks
The problem has been solved. Skype and antivirus are using port 80. Making apache listen to other port - like 8080 solved the problem.
I learned that apache "does not" share a port with other applications.
Hope someone else might be helped from this.
Sukalyan

Unable To Connect To MAMP Server From Other Devices

I have MAMP PRO running locally on my machine (Mavericks). I can connect find to localhost and apache is running on port 80.
The test website I have set up is served. I can browse to it via http:// my-local-host (have to put a dash in because stack exchange doesn't like URLs) or http://mymachinename.local or http://XXX.XXX.X.XX (my ipaddress).
It's not working remotely though from either iPhone or iPad. I have tried turning off the firewall. I have tried adding a rule to the firewall to allow incoming connections to httpd. Neither work.
I also have Little Snitch installed. I tried turning off Little snitch and also creating a rule to allow traffic through to port 80 via httpd. Neither work.
Anyone else had similar issues and found a resolution?
The problem is DNS.
MAMP writes your Hosts to /etc/hosts.
Example:
127.0.0.1 example.com
Your Iphone's host file has no such entry. This is why it does not work.
You need e.g. a "DNS-server", which you can enter in
Settings - Wlan - static as Router on your phone.
I think your problem would be addressed if you use the Dynamic DNS option in MAMP PRO. Then, using a third party company like noIP.com, you could setup myTestBox.ddns.net and pull up your website on your iPad.