# Issue with my proxy configuration

**URL:** <https://www.ruby-forum.com/t/issue-with-my-proxy-configuration/228434>\
**Category:** NGINX\
**Created:** [April 22, 2013, 3:18pm UTC](https://www.ruby-forum.com/t/issue-with-my-proxy-configuration/228434 "2013-04-22T15:18:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/u/SSJSSrg_KastningSS_S)\
**Post date:** [April 22, 2013, 3:18pm UTC](https://www.ruby-forum.com/t/issue-with-my-proxy-configuration/228434/1 "2013-04-22T15:18:39Z")

</div>

Hello.

In our lan I can reach my webapplication with an url like http://  
:8081/AppName. I try to configure nginx to forward requests  
from wan site to this server. All firewall policies needed are  
configured  
and the dns entry for access from wan are set and reachable.

I tried the following configuration in /etc/nginx/nginx.conf:

server {  
listen 80;  
server\_name [host.domainname.de](http://host.domainname.de);  
rewrite ^ https://$server\_name$request\_uri? permanent;  
}  
server {  
listen 443;  
server\_name [host.domainname.de](http://host.domainname.de);

```
            ssl on;
            ssl_certificate domainname.de.pem;
            ssl_certificate_key domainname.de.key;

            ssl_session_timeout 5m;

            ssl_protocols SSLv3 TLSv1;
            ssl_ciphers

```

ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;  
ssl\_prefer\_server\_ciphers on;  
location / {  
proxy\_pass http://:8081/AppName;  
}  
}

With this configuration the webapplication ist available when I use the  
url  
[http://host.domainname.de/AppName](http://host.domainname.de/AppName). But I want to access the webapp with  
the  
url [http://host.domainname.de](http://host.domainname.de).  
Is this possible?

Regards,  
Joerg

---

<div class="post-metadata">

**Author:** ![SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/u/SSJSSrg_KastningSS_S)\
**Post date:** [April 22, 2013, 4:48pm UTC](https://www.ruby-forum.com/t/issue-with-my-proxy-configuration/228434/2 "2013-04-22T16:48:37Z")

</div>

Hi.  
Try something like:  
location / {  
proxy\_pass http://:8081/AppName/;  
}

Or

```
            location / {
                    proxy_pass 

```

http://:8081/AppName/$uri;  
}

---

<div class="post-metadata">

**Author:** ![SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/u/SSJSSrg_KastningSS_S)\
**Post date:** [April 23, 2013, 8:41am UTC](https://www.ruby-forum.com/t/issue-with-my-proxy-configuration/228434/3 "2013-04-23T08:41:32Z")

</div>

is your Appserver hostname-aware?

your error 500 should come from your appserver; check  
your logfiles on that part

[http://wiki.nginx.org/HttpProxyModule](http://wiki.nginx.org/HttpProxyModule)

Posted at Nginx Forum:

> **[Re: Issue with my proxy configuration](https://forum.nginx.org/read.php?2,238537,238570#msg-238570)**
>
> Hello. In our lan I can reach my webapplication with an url like http:// \<servername\>:8081/AppName. I try to configure nginx to forward requests from wan site to this server. All firewall policies needed are configured and the dns entry for...

---

<div class="post-metadata">

**Author:** ![SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/u/SSJSSrg_KastningSS_S)\
**Post date:** [April 23, 2013, 8:32am UTC](https://www.ruby-forum.com/t/issue-with-my-proxy-configuration/228434/4 "2013-04-23T08:32:11Z")

</div>

Hi.

I tried both and it gets a little bit better. But now I get a 500-error  
when trying to access [http://host.domainname.de](http://host.domainname.de). The url returned is  
[http://host.domainname.de/AppName/main.aspx?svid=7](http://host.domainname.de/AppName/main.aspx?svid=7). At first I thought  
the  
Webserver is broken but I still can access the Webapplication via  
http://:8081/AppName from my LAN.

Regards  
Joerg

2013/4/22 Andrey F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
