2017-05-03 241 views
0

如何在NGINX中部署在Netbeans中創建的Java Web應用程序。我已經嘗試使用this鏈接來配置我的應用程序。在NGINX中運行Java應用程序

+1

NGINX只是代理你應該將我們的Web應用程序的戰爭部署到Tomcat(或類似的)。 – ikettu

回答

0

請配置您的nginx代理設置。 位置/ {

 proxy_pass http://localhost:8080; #or use http://127.0.0.1:8080 
root /etc/tomcat7/webapps/apple; # path of you application.   
index index.html; 
     proxy_set_header Host   $host; 
     proxy_set_header X-Real-IP  $remote_addr; 
     proxy_set_header X-Forwarded-for $remote_addr; 
    } 

現在查一件事,你的服務器是訪問您的端口 請猛擊netstat的-ntpl並檢查你的8080端口和80端口是一個訪問,但所有IP

+0

我們可以使用ngnix進行2個mahines之間的通信。就像任何tcp,udp協議一樣。我想在2臺機器之間進行通信。但不使用tcp/ip或udp協議。 –