Wamp Blocking Outside traffic - apache

Wamp Version:2.5
Windows Version:10
Apache Version:2.4.9
Wamp is Green, and its online, and it works when i type localhost, and it work in my local network meaning anyone in my house can access the site , i already port forwarded! but when i try to access my site from outside my network it keeps loading and never works!
Virtual host
<VirtualHost *:80>
DocumentRoot "C:/wamp/www"
ServerName aaess.tk
ServerAlias www.aaess.tk
Options Indexes FollowSymLinks
<Directory "C:/wamp/www">
AllowOverride All
Require all granted <- to allow inet access
</Directory>
</VirtualHost>
Can someone please help and explain why wamp is blocking outside traffic?

Possibly your ISP is blocking port 80.
Simple Test
You could just change your Port Forwarding.
Instead of forwarding router port 80 to PC port 80, just amend the Routers Port Forwarding to forward Router port 8888 to PC's port 80.
Then access the site using http://aaess.tk:8888
Using this method you can leave your Virtual Host on port 80.
It maybe worth trying a few different port numbers, I have knows ISP's to block port 8000 and 8080 as well as these are the most frequently tried alternative port numbers.
Also if you are getting your internet connection via a central connection in an apartment block or compound of some sort. It maybe that you will not find any port that you can use as the central router will be blocking all ports other than port 80.

Related

Connect with public IP (ok) & Domain (not ok) EC2 Windows Instance

here is what I did so far:
I have setup a windows 10 instance
I assigned an Elastic IP
I added rules to the security group
HTTP TCP 80 0.0.0.0/0
Custom TCP Rule TCP 7474 0.0.0.0/0
MYSQL/Aurora TCP 3306 0.0.0.0/0
I assigned the public IP to the domain in the hosted zone as A record
I installed XAMPP 3.2.2
I made sure in httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
is active
In httpd-vhosts.conf I entered
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/my_app"
ServerName myapp.cloud
ServerAlias www.myapp.cloud
<Directory "c:/xampp/htdocs/my_app">
AllowOverride All
Require all Granted
</Directory>
</VirtualHost>
I also changed hosts on the Windows Server (C:\Windows\System32\drivers\etc)
127.0.0.1 myapp.cloud
I rebooted the system
I started Apache via XAMPP Panel
Results:
I can access myapp.cloud local on the server with RDP session
I can access the public IP from outside and get the XAMPP screen
I can also access publicIP/my_app and get my application
A ping confirms that port 80 is obviously open (otherwise I wouldnt see the XAMPP screen as well)
I CANNOT access the application by typing myapp . cloud - this results in
ERR_CONNECTION_TIMED_OUT
Also Port 7474 seems NOT open although there is an entry
A port check (http://ping.eu/port-chk/) gives:
myapp.cloud:80 is open
myapp.cloud:3306 is open
myapp.cloud:7474 is CLOSED
Apparently the domain resolves correct as a DNS check returns the correct IP
So my issues:
Port 7474 isnt open although set in security
Cant access myapp.cloud although DNS seems right and port 80 is open and listens. (tested on FF and Chrome)
Any hints are very appreciated,
thanks.
######## EDIT ############# 09-11-2017
The problem of the unconnected IP is solved. It was a wrong DNS setting in my internal router - the router didnt renewed the IP settings. So Internet said DNS is correct but private network didnt - I flushed DNS on my PC but forgot to check the router and there was the problem.
Still struggling with the ports ..

How can I change all my links on my Apache site to look for port 8080 instead of 80 after changing my site from 80?

My local Apache environment, on XAMPP, was set up to listen on port 80. I now changed it to listen to port 8080. my site now works on port 8080. I have to go to mysite.local:8080 to make it work, which is fine. The only problem is when I click a link it goes to mysite.local/page instead of mysite.local:8080/page and the page does not work. Also, some of my pages that use a log in require me to NOT use 8080 in the url so I have to use mysite.local/admin instead of mysite.local:8080/admin so I am constantaly swithing between adding the port number in the url and taking it away for some other pages. Is there a way where I can make it where I don't have to specify port number on any of the pages. This happened after installing IIS by the way.
My vhost page now looks like the below:
<VirtualHost mysite.local:8080>
DocumentRoot "C:\repos\www.mysite.org\web"
ServerName mysite.local
ErrorLog "logs/mysite-error.log"
CustomLog "logs/mysite-access.log" common
<Directory "C:\repos\www.mysite.org\web">
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
The problem is, that after you changed Apache to listen on 8080 Apache does not even see traffic on :80 (and that's where default HTTP traffic goes).
As you said that you have IIS listening on :80, the only way to solve your problem is to make IIS act as a reverse proxy that would forward all the traffic that should be meant for Apache to Apache.

Server external connection refused

I am currently using WampServer 3.04, I can connect to it using my local network IP without any problem, but when it comes to connect via the Internet I always get this response: Connection REFUSED!
I have done a lot of things:
Enable Incoming Connections on my firewall for the port 8080 (The port that I want to use)
Configured HTTPD and HTTPD-vhosts both on my current IP and the port
Enabled port forward from extenal 8080 to private 8080 to my computer IP
Enabled put Online on Wamp
Tested if my port 8080 is open and it is open.
I honestly do not have anything else to try.
My httpd-vhosts:
<VirtualHost *:8080>
ServerName 192.168.1.3
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
I also had the same issue since port 80 was used by VMware process. Hence I killed VMware process.
Run Powershell (get-process VM | stop-process -force)
Use star before &after vm
Start WAMP then goto Apache then -test port 80. If its not working then install Apache service(found below test port 80).It should solve the problem.
Regards,
Aameer

Port based virtual hosts on apache

httpd.conf set up as follows on an apache server:
Listen 80
Listen 78
ServerName 162.13.46.59
DocumentRoot /var/www/ftl-media
NameVirtualHost 162.13.46.59:78
<VirtualHost 162.13.46.59:78>
ServerName 162.13.46.59
DocumentRoot /var/www/vapetropolis
</VirtualHost>
However, requests to port 78 aren't working. "Oops! Google Chrome could not connect to 162.13.46.59:78".
What's wrong with this config?
Generally speaking, port numbers less than 1024 require the process to run as root. This isn't so much of a firewall issue as a security policy -- those ports are reserved for system processes.
If you want to use port 78, some configuration will be required.
Maybe this question will help?
Is there a way for non-root processes to bind to "privileged" ports on Linux?

XAMPP Apache server not working on internal network

I have XAMPP installed on my local laptop (Vista) and it works fine. Apache and MySQL are running as services, and I can get to both http://localhost/ and http://192.168.2.2/ without any hassles.
However, if I try accessing the server from another laptop on my internal network by typing in the http://192.168.2.2/ ip address, it errorstimes out. What am I missing here?
When I run Port Check, I get the following:
Service Port Status
==============================================================================
Apache (HTTP) 80 Program: C:\xampp\xampp\apache\bin\httpd.exe
Apache (WebDAV) 81 free
Apache (HTTPS) 443 Program: C:\xampp\xampp\apache\bin\httpd.exe
MySQL 3306 Program: C:\Program Files\MySQL\MySQL Server 5.1\bin
\mysqld.exe
and when I try telnetting to localhost port 80, that works too. My httpd-vhosts.conf file contains the following lines:
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/xampp/htdocs/"
</VirtualHost>
<VirtualHost 192.168.2.2>
ServerName localhost
DocumentRoot "C:/xampp/xampp/htdocs/"
</VirtualHost>
Any thoughts?
Answered via help at ServerFault.com
The problem was that the Windows Firewall had port 80 blocked. To fix this, I opened Windows Firewall, clicked Change Settings, went to the Exceptions tab, and then "Add Port". I set Name to "Web Server (TCP 80)", Port Number to 80, and Protocol to TCP and that was it.