पर सबडोमेन सेट अप करना मैं nginx पर सबडोमेन सेट करने का प्रयास कर रहा हूं। मेरा सेटअप पोर्ट 8080 पर चल रहा है और nginx से प्रॉक्सी का उपयोग कर एक पिलोन ऐप है।nginx
कारण मैं काम करने के लिए सबडोमेन प्राप्त करने का प्रयास कर रहा हूं अंततः देव और स्टेजिंग सर्वर स्थापित करना है।
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log logs/rentfox.access.log;
error_log logs/rentfox.error.log;
gzip on;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 75 20;
server {
listen 80;
server_name xxx.net;
location/{
include /usr/local/nginx/conf/proxy.conf;
proxy_pass http://127.0.0.1:8080;
proxy_redirect default;
root /var/apps/xxx/xxx/public/;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
server_name dev.xxx.net;
location/{
include /usr/local/nginx/conf/proxy.conf;
proxy_pass http://127.0.0.1:8080;
proxy_redirect default;
root /var/apps/xxx/xxx/public/;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
अग्रिम धन्यवाद:
यहाँ मेरी nginx.conf फ़ाइल है!
ऐसा लगता है कि यह ठीक काम कर रहा है :) – Frozenskys