Nginx-TCP-Link-Problem
1. Derzeit wird meine Nginx-Konfiguration auf Port 80 gestartet, und dann habe ich einen Hintergrunddienst auf Port 8080 gestartet
Ich verwende Nginx als Reverse-Proxy. Das Problem, auf das ich derzeit stoße, ist, dass beim erneuten Starten des Hintergrunddienstes ein Fehler gemeldet wird
1 2 | <code>Bind port 8080 error: Address already in use
</code>
|
Dann netstat, um zu sehen:
1 2 3 | <code> sudo netstat -anpto |grep 127.0.0.1
tcp 0 0 127.0.0.1:8080 127.0.0.1:8080 ESTABLISHED 3841/nginx off (0.00/0/0)
</code>
|
Was mich verwirrt, ist, warum ich mit mir selbst verbunden bin?
nginx-Konfiguration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <code>upstream test.com{
server 127.0.0.1:8080;
}
server
{
listen 80;
server_name test.com;
index index.html index.htm index.php;
location / {
proxy_pass http:
add_header cache-control "no-cache, max-age=0" ;
add_header Pragma "no-cache" ;
}
</code>
|
Zugehörige Informationen:
http://in.sdo.com/?p=3044-
http://blog.csdn.net/kofshower/article/details/5316580-
https://realaboo.wordpress.com/2009/12/28/%E6%9C%89%E8%B6%A3%E7%9A%84-single-port-self-connection-%E7%8E%B0 %E8%B1%A1/-
http://blog.csdn.net/justlinux2010/article/details/20947609-
为情所困2889 Tage vor675