Sharing Apache Server with the Internet? - apache

I installed Apache with WAMP. I want to make my computer as a server for my web page for make some experiment on my web site.But I can`t open my server in Internet. I can see it in http://localhost/mysite/index.html but when I try to reach it in another computer like http://myserverip/mysite/index.html it says server not responding. I am using wireless router and also forwarded to my LAN ip.

A few ideas:
check that apache is bound to your PC's internal IP rather than just localhost - run netstat -an and verify that you have local address 0.0.0.0:80 not 127.0.0.1:80
check that you're definitely forwarding port 80 from the router to your PC
check that you're not firewalling off the traffic, i.e. make sure there's an exception in the windows firewall for port 80 (and 443 if you're using HTTPS), or a program exception for httpd, or even try turning off the firewall temporarily whilst debugging this
find out if your ISP is blocking this - some won't let you run web servers from your home connection; you could try a different web port to see if that helps?
try connecting from some other machine - there could be some proxy configuration that's upsetting looping back into your PC

Related

How To open ports on Ubuntu in Google cloud platform

I am trying to run an ubuntu apache server on Google cloud platform, I have created the VM instances but I can't connect to any other port apart for from 80 and 22.
Here are all the things I've tried so far:
Created Firewall rules to allow ingress traffic to ports 21,20 and 443.
Created FireWall rules on the Ubuntu Machine itself
The only ports that seem to be open are the 80 and 22.
I also allowed both HTTP and HTTPS access in the VM settings
So Basically, what I am trying to do is to open ports on my server. I'm not sure what am doing wrong.
You have already installed apache, and it's running on the port 80 as you can see on the nmap test, a closed port just mean that there's no application running on that port, this is different to filtered, see this for more information, this confirms that your firewall rules are correct (you are allowing traffic from all sources 0.0.0.0/0). By now you should be able to access your website on the port 80, if not I suggest you to follow this GCP guide.
So, if you want to run apache on the port 443 you just need to change its configuration (basically you will need to get a certificate for your server, configure some related parameters and then create a virtualhost listening on the 443 port, there are many guides on the internet for this just google for "enable https apache [your_OS]"), that should be enough since the firewall rules on GCP and your instance appear to be properly configured.

apache2 not working with port other than 80

I have nginx running at port 80.
After installing apache2, I set its port to 82 (both in ports.conf and 000-default.conf).
I have tried opening the ip (i.e a.b.c.d:82) but its not opening. But if I set port to 80 and stop nginx then its opening.
I tried opening ip with the below format:
a.b.c.d:82
a.b.c.d - opening nginx site
I also tried setting dns to abc.mydomain.com and opened
abc.mydomain.com (opening nginx site)
abc.mydomain.com:82 (not opening anything)
How to access it using apache with some port other than 80 ?
Please let me know for more questions.
Thanks.
The discussion and investigation in the chat revealed that this actually was about a remote system, not a local development setup. That means that typically a package filter ("firewall") is in between client and sever. When using a non standard port for a "well known protocol" you need to open that port in the servers firewall for incoming traffic.
In this case using Ubuntu's ufw tool had been used to setup a simple package filter. Configuring the custom port 82 and allowing incoming traffic to it solved the issue at hand.

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

Why my VPS not accepting connections from outside?

I have a windows server 2008 VPS with no software installed on it and the only way to connect to it is remote desktop connection so I have to prepare it from scratch.
I installed apache server on it BUT after installing apache:
ON THE VPS:
when i go to localhost i get the "it works!" Home page so this sounds ok.
and "Netstat -a" results shows port 80 ok as following:
From other pc
- can't go to homepage via browser.
NOTE: I don't have a domain but i wish to access via browser using the VPS ip.
nevermind guys it worked now.
I just added port 80 to firewall. I thought that if the port stats is Listening then it is ok but I found out that I have to add the port to the firewall too.

how to set up xampp as online server?

I'm using xampp as a testing host, but I want to be able to access it from anywhere. currently I can access it through localhost only, and through lan by typing my local ip, but not by typing my external ip from anywhere. I tried setting up apache vhosts, but I'm not sure what to put there, examples online aren't very clear, and I don't even know if it works. so if someone could give me a heads up, I'd appreciate!
Log into your router and set up port forwarding to your computer with xampp on it. You probably want to forward port 80 (default for http) to your computer's LAN IP. Then you should be able to access your xampp setup over the Internet by going to your external IP address.
first you need to make sure the incoming traffic on port 80 is not blocked by your firewall or ISP - see this video demo
then you need to configure your Router to forward:
incoming requests to your External IP port 80 towards your Internal IP port 80 - video demo here
and finally test if port open - see this demo