How to access virtual host made on XAMPP via smartphone? - mobile

I have a website running on my localhost, and it is set up as virtual host.
The problem is, it is no problem at all and works really okay on web browser on my computer, but is not accessible from my mobile phone.
Because virtual host is setup on my local, I know it works well when I access via web browsers on my computer.
But then how to access to this on mobile phone?
What I know is that in order to make accessible by mobile phone, it has absolute address by ip address, i.e, http://192.168.0.1/mysite
But due to complicated config made, the site is not working when to access as
http://192.168.0.1/mysite
but only works when
http://dev.mysite.com
(http://dev.mysite.com is the virtual host made on my local which is pointing to http://192.168.0.1/mysite)
Any help will be appreciated.

Related

Setting up angular project with puphpet, creating a virtual host

I recently started using VM's for development but I lack skills on setting up virtual hosts and using apache/nginx.
So I have a project now in two parts. Backend is created with Laravel and frontend with AngularJS. I'm using Apache in my VM.
I managed to set up virtual host for the backend with no problems. Now I'm having troubles on setting up a virtual host for AngularJS. I know I can run it with gulp serve, which in my case hosts it at localhost:9001. But that means I can access it in my virtual machine with that url. How can I access it from my machine? If my virtual machine url is 192.168.56.101, shouldn't I be able to access it from 192.168.56.101:9001? Right now it just says:
This site can’t be reached
192.168.56.101 took too long to respond.
You probably need to open up the port in the firewall section.

Open local website on computer from phone on same network

I have a local sandbox website on my computer running on nginx. I have chrome canary and that's what I"ve been using to test the various media sizes. Of course, this doesn't stack up against actual hands-on testing to get an idea of the feel of the website.
So, is there a way to be able to access a website running on my computer from the same network? Even if I have to use a specific app. I would like to use the same URL. dev.mywebsite.com and mywebsite.com run a on a server, sandbox.mywebsite.com is on my machine (this is the one I would like to access). I don't need to access to it remotely, just when I'm on my network is fine.
Note: I need to use the actual URL.
Thanks.
If sandbox.mywebsite.com maps to localhost on your computer, then by mapping sandbox.mywebsite.com in the hosts file of your phone to the local network IP address of your computer e.g. 192.168.1.9, you should be able to access it on the phone.
I have done this using android with hosts editor, connecting to apache running on an ubuntu laptop.
There are also many google results for this, so you may be able to find something there for your specific configuration.

Mobile Hotspot Replaces Site Address With Incorrect IP

On some of our web apps, when a user connects via a Verizon 5510L Jetpack mobile connection the site address is replaced with an incorrect IP address, and of course throws a 504 error.
Has anyone else ever experienced this? or know why this is happening?
We have other apps that are very similar, on the same server that do not have this issue. Unfortunately this is a popular device with our customer so avoiding the hardware is not an acceptable fix.
As a workaround, the user can connect to the site via a different connection, keep the browser open and connect to their mobile device. This Also is not an acceptable fix as the applications are often used in remote areas.

Access a website globally which is running nicely in LAN

I have developed an application (website) which is running in LAN nicely.
My application is built using Silverlight and I have published that website in IIS and I can access that application nicely in LAN through following LINK.
http://192.168.137.24/SilverLightBusinessApplicationWeb/SilverLightBusinessApplicationTestPage.html#/Home
Now I require to access that application globally all over the word from any PC through INTERNET so for that, what configuration I have to use?
You may want to redirect your port 80 to LAN IP via router/modem settings.

Silverlight app - service URL cannot handle IP address

I have a Silverlight app that run on a single server which also hosts the web service used for data access. This is a Service Reference in the project. A common issue is that someone browses to the app using an IP address rather than the machine name. This breaks because the app thinks this is a cross-site violation.
To access the web service we create a System.ServiceModel.ClientBase and assign is an address in the web.config file. So locally in dev this is localhost:xxxx, and in production is it the machine name. Or we could set it to the IP address, but then everyone would have to go to the app using IP address only.
Is there a good way to do this? One issue is that some people access the app internally where the machine has a good name, while others access it through a VPN where they may need to use IP. I would like for both to work.
FYI I had this same issue. silverlight application and wcf service running on same server, but when application is started using an ip address vs. application url, then cross domain problems occur. evidently these urls/ips are not resolved/matched locally so to the silverlight application, they look like different domains. My app is running as an application and couldn't be moved to root of iis web site for technical reasons which is required for a clientaccesspolicy.xml file or crossdomain.xml to work properly.
I solved it by adding an entry into the hosts file on the server with the ip address and name of the domain. This looks a bit strange since we are on the server pointed to by the ip address and the domain/machine name but it works.
Adding this locally in the hosts file evidently redirects all requests for the ip address to the server PRIOR TO making either the call to get the silverlight application or the call the wcf service, so they look the same no matter whether the application or the service is called using an ip address.
Hope this helps anyone else in the future.
FYI - this does not work with VMs
We use VMs for some functionality and I have found this just doesn't work when running clients from the VM. The VM manager must do something to the request before passing it through. Just thought I'd mention this for future use.
Have you tried creating a clientaccesspolicy.xml file?
http://msdn.microsoft.com/en-us/library/cc197955(v=vs.95).aspx

Resources