cannot access my webpage from outside (xampp) - apache

I am trying to set up a web server with Xampp (ver 7.0.13) on my home PC. I redirect port 80 from router to my PC and Xampp is listening to port 80. Also, I change router's web server's port to 8080 in order to avoid conflict.
Result: I can access my helloworld.html on my pc and my phone. However, If i turn off my iphone wi-fi and using 4G network, I will not able to access dashboard and my helloworld.html by public ip (56.XXX.XXX.XXX/helloworld.html)
I try :
reinstall xampp
try different version off xampp
change config file >> Order deny,allow from all (something like that
try to change but cannot be found in most of the config files.
change router port forward setting.
But nothing work. What did I do wrong? ┐(´д`)┌

Maybe external traffic is blocked by the Windows-Firewall?

Is it a static IP? You should use a static IP in your server, if not, is impossible

Related

Unable to access Apache Vhost

I'm running apache through a clean Ubuntu server VM on Parallels for Mac. I have it set up following this tutorial
But when I try to access it from my mac, I get no response. Ping returns a response, but not viewing the page in chrome.
Here is my vhost file ccminecraft.com.conf
I also tried putting in
192.168.1.108 ccminecraft.com
192.168.1.108 www.ccminecraft.com
into my hosts file on my mac, but that didn't work. nslookup returns that it's searching on google's DNS, which both my mac and router are configured to use. But shouldn't it be going to 192.168.1.108 instead of doing a DNS lookup?
Try telneting the port 80 on your ip#
telnet 192.168.1.108 80 if it doesn't respond you need to reconfigure your firewall or disable it.
service iptables stop
systemd --> systemctl stop firewall
Before usig DNS try with ip# so in :
ServerName put yout_ip# if it works you need to disble the adapter that link you to the internet and just let VM adapter enabled

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

Website in lan with virtual host?

I have a specefic problem, i have more websites on my localhost server (xammp), they has a virtul host, but i want to access this websites trough lan or wlan because so i can test it on mobile devices. If i call only ip on other device then i see xammp control panel, but i don't know how can i call websites in lan like: "site1.local, site2.local, site3.local", are here static ip's needed? On the router is DHCP enabled. I read few topics and this is all clear for me, the problem is only access on this sites trough network.
Read topics:
How to set up Apache virtual host such as http://home/, http://office/, etc
Accessing localhost (xampp) from another computer over LAN network - how to?
How to set up Apache virtual host such as http://home/, http://office/, etc
Apache: see named virtual hosts from LAN
Find your IP of your server machine. If it uses windows, press start then type into the search bar cmd. Then when a command promt comes up type in ipconfig and hit enter. Look for "IPv4-address" and to the right of that is your local IP of your computer.
Then you can use a computer on your wireless LAN or a wired connection. Simply type in the IP of your computers local IP with XAMP, and you are good to go!
Hope this helped
-Kad
I do this on work for testing. We have a XAMPP localhost server. My projects are in the htdocs folder. like this: c:\xampp\htdocs\niceproject
The IP for reqesting xampp is something like this: 192.168.10.104.
Now for calling the Websites just do this: 192.168.10.104/niceproject
I hope this is what you are looking for.
To access multiple sites (virtual hosts) served from one machine (say lanwww running apache) on mobile devices the usage of ServerName (say site1, ServerAlias site1.lanwww) fails - the DHCP on the router won't map subhosts (site1.lanwww). I found that using different ports for the subsites works nicely though - remember to add appropriate Listen statements to the ports.conf. The configuration of other webservers is left as an exercise to the reader.

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

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