Access

ACCESS LOCALHOST WEBSITE FROM ANOTHER COMPUTER

Web developers spend a lot of time on their computers working on sample content. When it comes down to sharing what they have come up with, they face the setback of having to migrate their content to a public server, and this takes time. You see, sometimes you lack time to migrate your content to a public server and this makes it hard for you to show off your progress, a situation in which many people find themselves. Luckily, there are many systems which you can now use to enable people to access your site from the web.

How do virtual hosts work?

Have you heard of secure tunnels? Well, these are systems that provide people with access to your machine by way of the internet. They provide you with a URL that is accessible to the public and any taps on the URL direct people to your site. In this way, you can skip the setup and head straight to installing the app and pointing it to the direction of your site.

What systems can you use for this?

ngrok

This application works for Linux-based systems, Windows and Mac OS X. It not only creates a secure tunnel through which your hits flow, but it also gives you an allowance to replay the activity for testing. If you are unsure of whether you want to use the system, there is a free version that allows you to enjoy basic features. Once you decide to go premium, you have lots of options from which to choose, including how much you wish to pay. You don’t require anything else besides this app, and this enables you to stay free of dependencies.

ngrok session

How can you use it?

Start by accessing the ngrok website from where you can download the archive and extract it to your preferred location on your machine. Next, open a command line terminal before heading to the folder in which the file is. To create a secure tunnel on port 80, run the following command: . /ngrok 80. A screen will pop up showing which randomly generated ngrok address will forward to your site. As such, anyone with access to this URL will be in a position to access your site using any device, provided that they have a stable internet connection.

One attractive feature about this system is that you can inspect hits to your server. To do this, go to http://localhost:4040/ on your machine. In it, you will find a board showing the requests that have come through the server. If you wish to gain more information concerning the hits, tap on each call and the data will display on the right. You also have a chance to replay requests by tapping on the ‘replay’ option to the right. Once you do this, the call will go through the secure tunnel again.

Free users get to enjoy an array of features. For example, you are free to create your custom sub-domain such that you need not remember the randomly generated URL every time. Premium users have an advantage in that they can reserve a given name such that nobody else can use it. Both users can also use passwords to prevent just anyone from accessing their sites.

PageKite

This secure tunnel operates by way of python and can work on Windows, Linux-based, Mac OS X and Android operating systems. Its workings are similar to those of ngrok. Given that this system has been around longer than most other such systems, it can work many applications including the running of Minecraft servers on local machines.

You can use the free version as you figure out the way forward and if you decide to go premium, you get to choose what you pay. However, you can also get premium systems for free if you work on free open source software. Instead of offering users a chance to inspect their hits as is the case with ngrok, this system provides you an Android app which you can use for the same secure tunneling on your device.

The system providers are currently working on front-end relay servers which will provide faster speeds for their users. Australia is one such beneficiary of this development.

How to use it

Start by accessing the PageKite website and download a version that suits your operating system. Windows users must first install Python before downloading the files. In the case of Linux-based and Mac OS X operating systems, you can bypass the installation by running a command line. Once you download the file, you will then run a command which will run a secure tunnel to your site. Whereas in ngrok you get a randomly generated subdomain, you have to choose one in this case. It will then run and sign you into the device, thereby setting up your localhost.

With this system, you can forego the need for a web server as it comes with an inbuilt web server. You can also protect your site by the use of passwords as well as block access from unknown IPs.

Thanks to these systems, people can access your website at their convenience.