We have a PHP app which we installed on Azure VM. It works fine locally and accessible.
The server at 104.xxx.xx.xx is taking too long to respond.
We have used WAMP Server to host it and all looks fine. We are however not able to access it over the public ip of the server.
We have tried a few things without any result.
First of all, you can check if the port is listening with CMD comamnds netstat -anbo. If the port is listening on external address 0.0.0.0 then you can check if the firewall inside the Azure VM or NSG associated with the Azure VM NIC or subnet blocking it.
Navigated to the virtual machine --- networking ---inbound port rules to find the related NSG rules on the Azure portal.
You also can telnet the VM public IP address and port from the on-premise machine to validate the networking connection.
Related
How to access localhost (xampp) Server from another computer over LAN network ,
I installed XAMP version: 7.2.10
Also from my local host , I have a php application/page which connects to a page in the internet (hosted outside the local host) and i want to get response from that page through gateway when I call that page by post/get method .
how to do this?My Local Network is limited to internet connection
Bind your apache to the LAN IP(e.g. 192.168.0.XXX, 10.10.1.XX).
Make sure you allow in your firewall inbound connections on port 80 (or whatever the port your apache runs on).
Configure your virtual host with Server Alias
As long as you don't have restrictions on the LAN you should be able to access the local webserver from the LAN using http://
In regards you your second questions, if you query the external page/resource synchronous you will get the response without problems. If you will expect an asynchronous response, you will need to prepare a bit more and expose your apache port to the internet via a NAT port forward(you will need access to the LAN router) and set your callback to the public IP:port/path
Is there a way to connect from a Windows 7 virtual machine from Oracle VirtualBox to Mac Mountain Lion localhost php application?
The problem is some web apps need to be tested on that lovely IE, so hence the virtual machine; the development or host environment is Mac. The PHP web app was started via terminal command: php -S 127.0.0.1:port#.
Is there anyway from the virtual machine, can one use IE to browse the web app on the Mac host?
Tried WineBottler, IE8 constantly crashes there; Tried plain Wine, IE8 doesn't seem to respond at all, though it installs and opens, but freezes.
Last option is to connect through virtual machine or the long way via online server.
Thanks for the help!
Have you had a look at Vagrant? You can forward ports to the host machine, and Virtual Box is actually a dependency for it anyway. I've never used it with a Windows box so that's something you'll have to have a look into.
By forwarding ports I mean you could open port 80 on the virtual machine and access that in the host via 8080 for example.
Here's how I got this working for anyone interested:
Find out the IP adresses of the host and guest systems.
Windows: ipconfig - IPv4 Address
Linux: ifconfig - inet addr
Mac: ifconfig -a
From Oracle VBox Network settings, choose NAT adapter.
Select Port Forwarding.
Add a new rule with the plus sign.
Give the rule a name, set protocol to TCP, set both ports to 80 and put the Ip adresses found out in step 1 in their respective fields.
From your browser point to the Ip address of the guest if in host or vice-versa.
Note: In my case, I needed to see my web app on the guest system, so I ran the app using the Ip address of my host and gave any port number (not in use). Then from the guest, I pointed to that Ip address and port number.
Example:
Assuming that the Ip address of the host is: 192.168.1.11
From host terminal: php -S 192.168.1.11:3000
From guest browser: 192.168.1.11:3000
I am trying to test a php website using the web browser in android device (Google Nexus S). The Android version is 4.0.3. I have installed WampServer on my machine (running Windows 7) and have copied my php code in the wamp/www directory. I am able to test the code by browsing to localhost from the web browser on my machine. To test from my android device I tried browsing to my machine's public IP address, but the browser just gets stuck and doesn't load the page.
Does anyone know a solution to this problem ?
Thanks.
If you are browsing to your PUBLIC IP you need to ensure your Windows 7 firewall is allowing traffic on that port. Browsing from your localhost most likely works because your firewall doesn't block local traffic. Browsing to your PUBLIC IP means you are going out to the internet, hitting your firewall (router/windows 7?), and then trying to get to your server. Do you have port forwarding setup on your router? Have you tried accessing your local LAN IP rather than your public IP?
Here's what I did:
References :
http://forum.wampserver.com/read.php?2,13744
http://forum.wampserver.com/read.php?2,30970,30989
I changed Apache httpd.conf to listen at port 8080 instead of 80.
Also I added a new inbound rule in my windows firewall to allow port 8080 TCP connections.
I have two sites. One is remote (online) and another localhost (on my developer machine).
The remote site in on dedicated IP address XXX.XXX.XXX.XXX and the localhost machine is public IP YYY.YYY.YYY.YYY. The remote site is a wesite running online like any other internet site.
Both remote and local machine are running mysql db and PHP.
What I need is to have the remote site (on the internet, IP address XXX.XXX.XXX.XXX) connect to my local machine (with the public IP YYY.YYY.YYY.YYY) when some specific webscripts are run by visiters to my website.
How do I establish a connection to my localhost from the remote website using PHP?
Please note that I'am asking for the opposite of normal practice of having a local machine connect to a remote machine.
You will need to configure port forwarding or a DMZ on your router. Port forwarding on port 80 will probably be easiest and more secure (it'll stop web traffic on other ports connecting to your PC which a DMZ would otherwise allow).
The process for setting up port forwarding differs from router-to-router, but it should be relatively easy to find in your router's admin panel. Find the private IP of your PC and, in your router's config, set up so all requests on port 80 to forward to the PC's internal IP.
Actually I'm making a web project using Wamp server, and to run the same I access it using the usual local-host address, as we do while building a project on our PC. But to share my project with my friends, I want to make access using the IP address of my computer.
But when I make such an access it is not able to connect, which is not the case with my friend's project.
After I failed accessing using the Wamp Server, I installed Xamp Server, the project can be accessed using local host with both the servers (running one at a time) but not when accessed using my PC's IP address (which I find using http://www.whatismyip.com/)
Please Help me Sort out the problem, so that I can share my project with my friends and get a feedback from them.
First check the Listen directive in apache's configuration file (usually httpd.conf). If it only listens on 127.0.0.1 then it can not be accessed on your network interface.
You can also check it with:
netstat -na
You should see that port 80 is litening on all interfaces as somthing like:
Proto Local Address Foreign Address State
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
If this is the case then you should check the access to your port 80 from the outside world. First of all firewalls can block the access to it. If you are behind a NAT (router) then you should use it's port forwading settings to open port 80 (or other arbitrary port) on the router an forward it to the port 80 on your PC.