简体   繁体   中英

How to Run a java app running in localhost with AWS

I have created an (AWS) Amazon web service server to run some Application created in Java, this app takes some port for example 8888 and runs locally in localhost:8888/index.html.

I can check that localhost:8888/index.html is working perfectly with the command:

curl localhost:8888/index.html

The thing is I don't know how to access to this app from my domain name, I know there is a way to do this using nginx , but unfortunately, all tutorials are about Node.js.

Following this article I managed to run a Node.JS app (simple app that prints hello world) running on localhost:8080, and when I access my domain name I could get the Hello world message printed!, my question is, can I do the same with a Java Application?

One best bet is to get the host ip and use it; instead of using localhost which sometimes mapped to 127.0.0.1, in such situation you can connect to the app within the host but not from outside.

Can you share the VM details?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM