I am in the middle of building a website which means it is not uploaded to a server yet. Is there any way I can perform cross browser testing from the localhost and not an actual hosted URL?
Either by running lots of browsers natively (some in a VM), or by using SSH tunnelling to a commercial service like browserling (http://browserling.com/).
Edit to elaborate a bit: An SSH tunnel (a reverse tunnel technically) between your localhost and a server allows you to forward certain ports on the remote host to ports on your localhost, over an encrypted SSH channel. This means the browsers running on browserling's servers can send packets down the tunnel, back to your localhost and your webserver there.
Install PHP on your local machine, this way you can run PHP scripts in command-line or browsers.
http://php.net/manual/en/install.php
Configure your webserver to listen on your network IP and access your website through IP address on your local network.
If it is apache webserver It would be configured using directive:
Listen IP:port
Example 1 (your adapter IP address):
Listen 192.168.1.10:80
Example 2 (global listening on all interfaces) - better for testing
Listen 0.0.0.0:80
Then just simply access your computer from other browsers on other platforms.
Sure. If you're able to configure your local network you could expose port 80 or 443 to the cloud by making changes to your routers firewall. This would make your application as available for testing locally as any on a remote host.
Let me know if your question is about which tools you could use, either as external services or locally installable.
Related
I'm using XAMPP server and I have my files in htdocs folder of XAMPP.
I had connected to my laptop using my mobile hotspot.
Can I access my files in XAMPP folder from another system which is not in same network i.e., can I access the files present in XAMPP folder from another another computer via internet
without router only by mobile hotspot?
Yes, it's possible to access the web server from an external network, depending on your current network configuration.
There are two simple solutions I think would suit you.
Configure your firewall if needed, enable port forwarding in your router settings to forward port 80 to the internal IP of the machine running your XAMPP-server.
If you're on a network in which you can't configure, I recommend checking out ngrok.com, which is a service where you can setup a public URL for your XAMPP-server. Works from any type of network, where you have internet-access, of course.
Note, alternative 2 is good for exposing a development-server, nothing I'd recommend for running a site in production.
Most network providers don't allow accessing the termials in the network.
If your provider does portforwarding and entering the public(!) IP of your hotspot should bei enough.
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
I am developing a symfony project on my local machine, I wish to test it on my mobile via IP (both machines connected to wifi network). how do I access port 8000 (symfony's default port) on my mobile phone?
I already know about accessing localhost via IP of the serving device, but I want to access the port too(8000) which I cannot fetch from my devices!
Thanks for all the help
As answered to another Question this might be solved when adding the parameter 0.0.0.0:8000 to let Symfony not only respond to local requests but also accept requests from other devices.
The call then should look something like this:
php bin/console server:run 0.0.0.0:8000
Same way you accessing it from your local machine but using it's IP address e.g.:
http://192.168.1.2:8000
where 192.168.1.2 is your machine IP address in local network (check it using ipconfig command - on Windows or ifconfig on Linux/Mac OS X). Please make sure your firewalls (on local machine and on router) does not block this (8000) port.
UPD: By the way, as far as I remember, Symfony's default port is 8080, not 8000. Please check it carefully.
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.
So I'm using this website:
http://www.howtoforge.com/ubuntu_debian_lamp_server
to setup LAMP on my Ubuntu Virtual Machine.
Here is my question though,
This will enable me to program and test through localhost. How can I set this up so anyone on the web can access my .php pages from any Internet capable device, and they will still interact with my local database, etc?
If you open port 80 in your firewall to your local machine, it should be available to the outside world via your ip address. You will need to check your router settings to figure out how to do this, but usually it's called port forwarding.
You could then use a free service like dyndns to give yourself a domain name that you can then type into your browser such as
myserver.dyndns.org
You have a couple of options...
1) Find a site that hosts LAMP and put you site up there. Many of them allow you to register a domain name and they manage the machine.
2) Do what Ben Rowe suggested, use a DNS forwarding service (Some are free, some not). Host the site on your own machine, some ISPs do not allow you to use port 80, you might need to use another port.