# Problem with proxy\_pass

**URL:** <https://www.ruby-forum.com/t/problem-with-proxy-pass/221214>\
**Category:** NGINX\
**Created:** [July 4, 2012, 4:42pm UTC](https://www.ruby-forum.com/t/problem-with-proxy-pass/221214 "2012-07-04T16:42:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [July 4, 2012, 4:42pm UTC](https://www.ruby-forum.com/t/problem-with-proxy-pass/221214/1 "2012-07-04T16:42:52Z")

</div>

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.

Posted at Nginx Forum:

> **[problem with proxy\_pass](https://forum.nginx.org/read.php?2,228280,228280#msg-228280)**
>
> 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
