Can't see site externally - apache

I'm brand spanking new to setting up websites, so go easy.
Basically I setup an osticket system on my XAMPP stack and It works locally no problem but when I try to access it from my public IP it won't connect.
I've port forwarded port 12345 -> 80 as my server listens on 80.
So theoretically if I type in my URL bar it should connect right?
In the httpd.conf file for Apache do I enter the external or internal IP address? I'm assuming I leave it as localhost because the .conf file is local to the server.
My networking setup:
Firewall setup:
<PublicIP:12345> ALLOW <PriavteIP>
Port forwarding setup:
<PublicIP:12345> -> <PrivateIP:80>

It's hard to tell without understanding more about your setup. I'm going to assume you have a router that connects your internal network to the Internet, and you have one or more computers connected in your network, and your server is one of those.
So are you talking about the port forwarding rules on your public-facing router's firewall? If you are forwarding port 12345 from your router to port 80 on your server, the reason it won't work is because a standard HTTP request from a public machine will come to your router on port 80, not port 12345. Are you entering in a URL with the 12345 port number in it? If anything, you should simply be routing all requests to port 80 on your router to the IP of your server.
You can check this if you try to view your web site using the port number in the URL. So if your IP address to your router is 5.6.7.8 you would enter http://5.6.7.8:12345 and this would load your web page, as the request for a page from port 12345 would get forwarded to port 80 on your server. But honestly I think you just need to get rid of port 12345.

Related

How host Webserver from Outside Network

I have subscribed to Local Broadband plan in Delhi, They have 1 static ip through which their all subscribe use it. When I Enter my ip from outside then it will forwarded to their Local IP management Software Page. How can i access to my web server, Is there my port forwarding technique like through unique port i can access to my localhost from out side or any other way. Even Dynamic DNS service like no-ip isnt working. they all are landing on same IP Management page.
Thank You in Advance.
Note: Using Nginx on Raspberry Pi.
The problem is with your Local Broadband company. Sounds like they need to do the port forwarding, or you from that "management page" you get to access.
You have to be able to forward port 80 from your router (the one with the Public Static IP) to the private (NAT) IP of the PI; both on port 80.

Using Apache server beside Windows' World Wide Web Publishing Service

I have an old site (oldsite.com) running via World Wide Web Publishing Service on a Windows Server 2003 server. I've just create a new site (newsite.com) using the same server but running through Apache. The old site with its service running on port 80 already so I had to config Apache using port 8080. The problem is now when I publish my new site, the url has to be newsite.com:8080. How can I config Apache so that it can contain no port, just newsite.com?
As far as I know from personal experience and research:
Due to the nature of DNS Records you cannot specify the domain to redirect to an IP address and a port.
If both servers are listening on the same port a request would not know which site to direct to.
As the default port the domain specifies is port 80, any other port must be specified for the request to go to the correct location.
Therefor you cannot have newsite.com redirect to the server IP on port 8080, as it can only be directed to the server IP with DNS records. The port must be specified in the URL if it is on a port other than 80.
Edit: I just found this post about using a reverse proxy to do something similar to what you have described. Take a look and see if it helps you.
You cannot have two services listening on the same port. You can change the old site to listen to another port, set apache to port 80, then use mod_proxy to enable the old site to be accessed from apache using virtualhost
I have just make it work. Although in IIS Manager, there was no website listening on 0.0.0.0:80 but I still had to delete this entry by httpcfg tool. After that Apache can start normally.

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

Apache Tomcat IP mapping to domain name

I am having apache tomcat server on my windows machine. Also I can access this server from other machines on the network.
Now I want to map the IP+Port combination to a name ie currently I have to write http://10.xxx.xx.xx:8080/app_name but I want to access it as http://app_name
How can I go about it? Is there any solution which I can achieve by adding some mapping in apache server file? Also DNS server is not in my control, any way to get around this problem?
Thanks
Rohit
By not specifying a port number, you are defaulting to port 80. Your options are to either modify your server to listen on port 80 or define an external load balancer VIP that does a PAT from port 80 to 8080.
If you take the VIP route, the hostname is defined on the load balancer. If you don't have that option and DNS isn't an option either, you could manually modify your hosts file with an alias. However, this would require all remote users to have your hostname - IP mapping in their local hosts files (making DNS the more manageable solution).
When user types the URL in browser, browser will establish TCP connection with web server in the port 80 by default in case of HTTP, 443 by default in case of HTTPS.
Yes. If Web server exposes any port other than default port, port has to be mentioned in the browser URL to connect and get the data.

Sharing Apache Server with the Internet?

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