7
मैं एक उप डोमेन पर प्रॉक्सी सामान को Nginx कॉन्फ़िगर करने के लिए कोशिश कर रहा हूँ के साथ कॉन्फ़िगर Nginx: dev.int.comproxy_pass
मैं चाहता हूँ dev.int.com आईपी करने के लिए प्रॉक्सी किया करने के लिए: 8080, और dev.int। कॉम/आईपी के लिए प्रॉक्सी किया को छिपाया: 7990
यहाँ मेरे वर्तमान कॉन्फ़िग फ़ाइल
server {
listen 80;
server_name dev.int.com;
access_log off;
location/{
proxy_pass http://IP:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
port_in_redirect off;
proxy_redirect http://IP:8080/jira /;
proxy_connect_timeout 300;
location ~ ^/stash {
proxy_pass http://IP:7990;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
port_in_redirect off;
proxy_redirect http://IP:7990/ /stash;
proxy_connect_timeout 300;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/nginx/html;
}
}
हालांकि,/गुप्त कोष रीडायरेक्ट/करने के लिए जा रहे हैं। मैं क्या गलत कर रहा हूं?
हाय, अभी भी/बजाय के लिए पुनः निर्देशित/गुप्त कोष – bear
अरे - ठीक बाहर इस आदमी के conf फ़ाइल की जाँच करें। उसे दो सर्वर प्रविष्टियां मिली हैं जो आपकी स्थिति में मदद कर सकती हैं। http://stackoverflow.com/questions/1174554/setting-up-subdomains-on-nginx –