Not listing proxy_pass port 8009
imran_kh
nginx-forum at nginx.us
Tue Jul 23 19:20:11 UTC 2013
Hello,
Thanks for the reply. I have never worked on Nginx server. So please help me
to resolve the issue.
File /etc/nginx/nginx.conf content are as follow.
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json
application/x-javascript text/xml application/xml application/xml+rss
text/javascript;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
File /etc/nginx/sites-enabled/default contains are as follows.
server {
listen 80;
server_name abc.com;
location / {
proxy_pass http://localhost:8007;
send_timeout 600;
proxy_read_timeout 120;
proxy_connect_timeout 120;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name pqr.com;
client_max_body_size 200m;
access_log /var/log/nginx/openerp-access.log;
error_log /var/log/nginx/openerp-error.log;
#ssl on;
#ssl_certificate /etc/ssl/nginx/server.crt;
#ssl_certificate_key /etc/ssl/nginx/server.key;
#ssl_session_timeout 5m;
#ssl_prefer_server_ciphers on;
#ssl_protocols SSLv2 SSLv3 TLSv1;
#ssl_ciphers
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#send_timeout 10m;
proxy_max_temp_file_size 0;
client_header_timeout 10m;
client_body_timeout 10m;
send_timeout 10m;
location /agromanager {
send_timeout 600;
proxy_read_timeout 120;
proxy_connect_timeout 120;
proxy_pass http://localhost:8003;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
location /web {
send_timeout 600;
proxy_read_timeout 120;
proxy_connect_timeout 120;
proxy_pass http://127.0.0.1:8005;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
location / {
send_timeout 600;
proxy_read_timeout 120;
proxy_connect_timeout 120;
proxy_pass http://127.0.0.1:8002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name xyz.com;
location / {
proxy_pass http://localhost:8010;
send_timeout 6000;
proxy_read_timeout 120;
proxy_connect_timeout 120;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
}
Only xyz.com is working properly expect abc.com, pqr.com and also trying
browse through IP address but getting “502 bad gateway”.
Thanks,
Imran khan.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,241157,241162#msg-241162
More information about the nginx
mailing list