Welcome! Log In Create A New Profile

Advanced

problem with proxy_pass

July 04, 2012 10:42AM
Hi everyone,

something wrong in my nginx.conf file:

user nginx;
worker_processes 8;

error_log logs/error.log;
pid logs/nginx.pid;

events {
worker_connections 8192;
}

http {
upstream www_serveriai_80 {
server 10.255.7.120:8080;
}
include /usr/local/nginx/conf/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /usr/local/nginx/logs/access.log main;

sendfile on;
keepalive_timeout 65;

server {
listen 80;
server_name alis.am.lt;

error_page 502 /502.html;

location = /502.html {
root /usr/local/nginx/html/;
allow all;
}
location /error502resourcescss {
alias /usr/local/nginx/html/error502resourcescss/;
}
location /error502resourcesimages {
alias /usr/local/nginx/html/error502resourcesimages/;
}

location /AlisL09Service {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://10.255.6.120:8080/AlisL09Service/;
proxy_redirect off;
}

location / {
proxy_pass http://www_serveriai_80;
proxy_set_header Host $http_host;
}
}
}

When i connect to AlisL09Service i find 400 error message, but i know that it should be 405 error. Everything worked fine yesterday, changed something don't remember exactly what (very dumb, right?) and it's not working correctly now. Please help.


Regards,
Karolis M.
Subject Author Posted

problem with proxy_pass

karolis July 04, 2012 10:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 74
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready