开发者

How to make my localhost available over internet

I have hosted an application on JBoss on my local machine and I can access by localhost or over my I开发者_如何学GoP also.

Now I want the same application to be accessed by other users over the internet by my IP.

Could you let me know how to configure my JBoss to server these requests?


You could start your JBoss server with this param -b to bind to a specific IP:

run.bat -b <IP>

For example if you adapter is configured with the IP 192.168.0.1 use the following command to bind your JBoss server to this adapter and listen on this interface:

run.bat -b 192.168.0.1

You can use 0.0.0.0 to bind to all available interfaces, too.

Because of security reasons JBoss binds only to localhost (127.0.0.1) by default.

If your computer is not directly connected with the internet you should check your router configuration and do a port forwarding to your JBoss machine for the required ports (e.g. 80 or 8080 for http).

It is much easier to find out your IP if you use a dynamic dns redirection service (like dyndns or dtdns). Most routers supports those kind of services and the are easy to use. Just register your external (internet) reachable name and setup your router to use it.

See http://www.dyndns.com/ for example. Most of the services are free to use and there are many providers for services like this (just google for "dynamic dns ip").


http://showoff.io is the easiest way to access localhost over the web. It requires ruby and ruby gem 'showoff-io'.

$ gem install showoff-io

Map the instance of your website to a localhost port i.e., localhost:9090. Then run:

$ show 9090

Or simply follow the instructions shown on showoff.io website.

UPDATE: showoff.io is now known as forward


http://no-ip.com You are going to set up a domain with you IP, and you are also going to have to configure the network to allow access.


http://ngrok.com provides a free script you can use with paid features. Site is a little bare, but I downloaded the script for free and got a tunnel working.

The domains they give aren't friendly though. Mine was of the regex: http://[0-9a-z]*.ngrok.com


http://localhost.run/ is another free way to get localhost on the internet. If you have SSH installed already you don't need to download a client to use it.


If you are using linux then ssh is pre installed; if not, just search how to install ssh in linux. Then note down the ip and port of your server. Open terminal

ssh -R 80:your_ip_address:your_port localhost.run

Hit enter this will give you a https link which you can use to go live. Now if you have Windows i made a software you can use called pagekitserver. So go to http://cide.rf.gd/ and download the exe file don't word it is just a python softwere i am using it for my web development purpose.and it is on github so it's safe. Now install it and turn off your antivirus if you see any error. Then follow the steps on that exe you will then have a subdomain for your localhost. You can use it. And if you need this just for sometime like 10 or 15 minutes then you can give it any email address.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜