Welcome! Log In Create A New Profile

Advanced

Re: Not listing proxy_pass port 8009

July 23, 2013 03:20PM
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.
Subject Author Posted

Not listing proxy_pass port 8009

imran_kh July 23, 2013 12:39PM

Re: Not listing proxy_pass port 8009

B.R. July 23, 2013 12:58PM

Re: Not listing proxy_pass port 8009

dbradfield July 23, 2013 01:04PM

Re: Not listing proxy_pass port 8009

imran_kh July 23, 2013 02:45PM

Re: Not listing proxy_pass port 8009

Miguel C. July 23, 2013 02:58PM

Re: Not listing proxy_pass port 8009

imran_kh July 23, 2013 03:20PM

Re: Not listing proxy_pass port 8009

Jonathan Matthews July 23, 2013 04:34PM

Re: Not listing proxy_pass port 8009

imran_kh July 23, 2013 07:41PM

Re: Not listing proxy_pass port 8009

Nikolas Stevenson-Molnar July 23, 2013 08:02PM

Re: Not listing proxy_pass port 8009

Miguel C. July 23, 2013 08:10PM

Re: Not listing proxy_pass port 8009

imran_kh July 23, 2013 08:20PM

Re: Not listing proxy_pass port 8009

Nikolas Stevenson-Molnar July 23, 2013 08:32PM

Re: Not listing proxy_pass port 8009

imran_kh July 23, 2013 08:44PM

Re: Not listing proxy_pass port 8009

Nikolas Stevenson-Molnar July 23, 2013 09:16PM

Re: Not listing proxy_pass port 8009

imran_kh July 23, 2013 09:36PM

Re: Not listing proxy_pass port 8009

Nikolas Stevenson-Molnar July 23, 2013 10:00PM

Re: Not listing proxy_pass port 8009

imran_kh July 24, 2013 03:19PM

Re: Not listing proxy_pass port 8009

Nikolas Stevenson-Molnar July 24, 2013 03:38PM

Re: Not listing proxy_pass port 8009

imran_kh July 24, 2013 04:36PM

Re: Not listing proxy_pass port 8009

Nikolas Stevenson-Molnar July 24, 2013 06:00PM

Re: Not listing proxy_pass port 8009

imran_kh July 24, 2013 05:50PM

Re: Not listing proxy_pass port 8009

naseeb0077 July 24, 2013 08:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready