I can access my wamp server via localhost in my system (port :8080), but not with public ip.
But then again when i try to access my wamp from other networks via public ip, yes i can get in.
The error i receive is "ERR_CONNECTION_REFUSED" it says that connect is rejected.
I have configured everything correctly, yes i have the apache config file set to allow all.
any clue?
Take a look at this. LINK
It could be NAT loopback that causes this for you
Related
I have installed WAMP and my computer ip is http://192.168.1.142/
When I entered it in browser I got nothing, my WAMP server doesn't see this ip
I got error :
**This 192.168.1.142 page can’t be found
No webpage was found for the web address:
192.168.1.142 HTTP ERROR 404**
http://prntscr.com/fx1mri
Tried configure httpd.conf Want add there row Listen 192.168.1.142:80 and when I run restart WAMP it's not green , means apache doesn't run ,
How correct this ? Why my local IP can't reach in my browser ?
Probably there will be 2 approach to solve this-
You need to provide the ip-address instead of localhost in your code.
Try not to use Skype at the same time since it uses same port number.
If it's your local computer I'll recommend you to use "http://localhost" or "http://127.0.0.1". Prefer localhost.
If you want to use some other cool hostname you should add it to your (windows)hostfile %SYSTEMROOT%\System32\drivers\etc\hosts
Example of input:
127.0.0.1 localsecure
Other programs like skype and torrent are usually using the same ports. Go to your httpd.conf and change listen to for example 82 and the servername to localhost:82(the port is always the same as the value of listen). And than you can use localhost everywhere for example your phpmyadmin would be:
localhost:82/phpmyadmin
And the directories:
localhost:82/..
Credit: ndsmyter
I'm using Xampp for this and have been able to get it to connect from my phone to the host using the hosts static ip 192.168.0.x but when I try to connect to the database though my public ip address it fails.
http://192.168.0.x/testdatabase/ works but
http://xx.xx.xxx.xx/testdatabase/ (my public ip) doesn't, I have enabled port forwarding on port 3306 to the hosts static ip but it still fails and I have even tried adding :3306 to the end of the ip.
How can I connect to the sever through my public ip address?
I'd probably use SSH Tunneling.
Tunnel to your server using SSH, then with your local client, connect to localhost on whatever port you've set your tunnel to for MySQL.
On Windows you can use putty to do that. Or ssh on MacOS / Linux.
I won't make a full tuto on how to setup an SSH tunnel but you'll find tons of sources on the web.
The problem is not PHP, the problem is that you didnt specify the rights for a user to connect from another IP.
You grant user specific rights in the rightsmanagement. If you want, lets say, from 10.10.10.10 to your DB as user "foo", you have to allow it:
GRANT ALL ON mydatabase.* TO bar#'10.10.10.10' IDENTIFIED BY 'randompassword';
Otherwise MySQL will block the access to your DB.
You also could allow EVERY IP:
GRANT ALL ON mydatabase.* TO bar#* IDENTIFIED BY 'randompassword';
Sidenote: It is NOT good to allow access from other than internal network (or even localhost). Exposing your Server to the world wont do any good.
I'm trying to create a live web server on my Windows 8.1 computer.
I am connected directly to my modem using ethernet (I do have a wireless router) but I am not connected to it on this computer (desktop).
I have XAMPP working and my website appears at http://localhost/home
However, if I put in my IP from www.whatismyip.com it does not load my web server.
What am I missing?
You need to create a Port Forwarding for Port 80 to your Computers local IP Address. There should be a Admin Panel for your Router (normally the Gateway - check out with Start - Run - cmd -> then insert "ipconfig" and check out the Gateway.
And i guess in XAMPP the Internet Access is blocked. But this is a simple Apache Server, so you need to open your httpd.conf File (Should be: “c:\xampp\apache\conf\extra\httpd-xampp.conf)
Search here for:
There should be a "Deny from all" - add a # in Front to deactivate that rule.
Restart your Xampp and it should work.
Here you find more Information about Port-Forwarding:
https://managewp.com/how-to-access-a-local-website-from-internet-with-port-forwarding
Any maybe you will also need to activate Port 80 on your Firewall (depends on your Configuration)
You need a method of telling request sent to your public ip to be forwarded to the private ip of the web server. Try logging into you device (router etc) and setting this up.
I am unsure of what url to use for my application to connect to my WAMP server on local host.
Currently I am using:
String link = "http://10.0.2.2/login.php?username="
Is this correct or is should it be something else?
e.g.:
String link = "http://localhost/login.php?username="
None of them, first open cmd to find out your computer ip by command ip config and then go to firewall and enable port 80 listening and use that ip address.
look at this :
http://josephshaaia.wordpress.com/2012/12/22/connecting-android-device-to-a-database-on-mysql-wamp-server/
I have the following setup below:
Amazon EC2 instance.
IPs:
192.168.1.200 = eth0 = x.x.x.x public ip address
192.168.2.200 = eth1
Apps:
Apache
vhosts:
-domain.tld
PHP
The strange part is this. When I try to browse domain.tld over public ip address, its working fine. But when I browse it through 192.168.2.200, it will keep waiting until no display coming out in the browser. A simple index.php with a text "test" inside is working fine. Only when the php codes like phpinfo() will not be working.
Do you have any idea what could be the problem in php or apache or my network? I have already open all ports on the firewall but the problem still persist.
Thanks.
I found the issue - it's due to incorrect network routing table on the EC2 server including blocking of traffic that rectified through playing security settings.
Thanks to your comment #Dagon.