how to set up xampp as online server? - apache

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

Related

Port Forwarding for web hosting

I just got a raspberry pi for Christmas and I have just installed apache, php and all the required stuff to host my website. I want to use my raspberry pi as a web server for my website. I obviously need to port forward! Apache is running on port 80 how safe is it to forward port 80? I want to know if I port forward is my whole Wi-Fi now under threat from hackers ? If I am hacked, what can they compromise ? And finally I heard about changing the apache port to stop malicious bot port scanners, can I just change my port from 80 to anything or are there only certain ports ?
Thanks, Jamie
The thing is: if you want people's web browser to access your web app, it needs to be on standard ports (80 or 443 for HTTPS). You'll need to redirect connections to ports 80 and/or 443 on your raspberry pi ' local ip in the configuration of your router.
If you want to isolate your raspberry pi from the rest of your local network and that your router allow it, consider putting it in a dmz
Even if you were to redirect on a custom ports later to be listened to by Apache, it wouldn't change much in such a case. If you want to secure your server, there is several other options to consider (fail2ban, firewall rules, etc).
Last: from personal experience, raspberry pis make good web servers to experiment with. Have a lot of nerdy fun

Can't see site externally

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.

Assign different port than 80 for Apache

i use OSX Mavericks that has built in Apache. I need to give access to a local website on my machine to someone , i did this many times before by enabling web sharing , opening port 80 for my local ip on the router and then by giving my is ip the website was live on the internet. Problem now is that i use the wifi connection from a friend and i cannot ask him for the router pass to open 80 as i am sure that he will not understand and maybe he even change the wifi pass. i checked the ports on the router and there are some open ports, i was wondering is it possible to change apache settings so it will listen to another port and then make the website publick by giving again my isp ip? i tried to nano httpd.conf and change Listen 80 to Listen 12345 (for example) so i thought that if my ip is 55.666.45.155 and i type 55.666.45.155:12345 my website will popup but it doesn't work.
Is this possible to do somehow?

show my localhost in someother pc via ip

I have a site in my local which is running under xampp.Now in another Mac I want to access the local site.It can be done via sharing the ip? or something to write in host file.The source machine is windows and the target machine is mac.
I dont know how to include the ip in host file in Mac.
Assuming that it's running on port 80 or 443 and your firewall is set to allow requests on those ports, you should be able to navigate to the ip address in a browser. If you're requesting your local site from outside your subnet then you might need to configure port forwarding on your router

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