# Configuration reverse proxy

**URL:** <https://community.gladysassistant.com/t/configuration-reverse-proxy/2464>\
**Category:** Présentations\
**Created:** [February 21, 2018, 2:38pm UTC](https://community.gladysassistant.com/t/configuration-reverse-proxy/2464 "2018-02-21T14:38:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WolfVic](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/wolfvic/32/167_2.png) [@WolfVic](https://community.gladysassistant.com/u/WolfVic)\
**Post date:** [February 21, 2018, 2:38pm UTC](https://community.gladysassistant.com/t/configuration-reverse-proxy/2464/1 "2018-02-21T14:38:36Z")

</div>

Hello,  
I wanted to know how to modify the nginx settings to have redirects like [monip]/plex to go to [monip]:32400 or [monip]/wolfvic to go to the folder /var/www/html/wolfvic. I tried to create a new file in `/etc/nginx/sites-available` as well as directly in gladys-ssl but it doesn’t work, when it doesn’t make a google search, it redirects to [http://plex](http://plex). It’s very strange, no matter what I put after the `/` the url changes to remove my ip.  
I searched the net but I can’t see where I’m stuck…

my gladys-ssl file:

> server {  
> listen 80;  
> listen [::]:80;  
> return 302 https://$server\_name$request\_uri;  
> }
> 
> server {
> 
> listen 443 ssl;  
> listen [::]:443 ssl;  
> include /etc/nginx/snippets/self-signed.conf;  
> include /etc/nginx/snippets/ssl-params.conf;

> #Assets  
> location ~ ^/(fonts|hooks|min|img|js|styles|templates)/ {  
> root /home/pi/gladys/www;  
> gzip\_static on;  
> expires 30m;  
> add\_header Cache-Control public;  
> # access\_log /dev/null;  
> }

> gzip on;  
> gzip\_disable «&nbsp;msie6&nbsp;»;

> gzip\_comp\_level 4;  
> gzip\_min\_length 1100;  
> gzip\_buffers 16 8k;  
> gzip\_proxied any;  
> gzip\_types  
> text/plain  
> text/css  
> text/js  
> text/xml  
> text/javascript  
> application/javascript  
> application/x-javascript  
> application/json  
> application/xml  
> application/rss+xml  
> image/svg+xml;

> client\_header\_timeout 10;  
> client\_body\_timeout 10;  
> keepalive\_timeout 10 10;  
> send\_timeout 10;

> location / {  
> proxy\_pass [http://127.0.0.1:8080](http://127.0.0.1:8080);  
> proxy\_set\_header Host $host;  
> proxy\_http\_version 1.1;  
> proxy\_set\_header Upgrade $http\_upgrade;  
> proxy\_set\_header Connection «&nbsp;upgrade&nbsp;»;  
> proxy\_intercept\_errors off;  
> error\_page 502 /502.html;  
> }

> location = /502.html {  
> internal;  
> root /usr/share/nginx/html;  
> }

> location /wolfvic/ {  
> root /var/www/html/wolfvic;  
> }  
> }

other file:

> ssl\_certificate /etc/nginx/nginx.crt;  
> ssl\_certificate\_key /etc/nginx/nginx.key;  
> server {  
> listen 80;  
> listen [::]:80;  
> server\_name \_;  
> return 301 https://$host$request\_uri;  
> }  
> server {  
> listen 443;  
> listen [::]:443;  
> server\_name \_;  
> ssl on ;

> ```
> location /wolfvic/ {
> root /var/www/html/wolfvic;
> proxy_pass http://127.0.0.1/wolfvic;
> proxy_set_header Host $host;
> proxy_set_header X-Forwarded-For >$proxy_add_x_forwarded_for;
> proxy_connect_timeout 30;
> proxy_send_timeout 30;
> }
> location /plex/ {
> proxy_pass http://127.0.0.1:32400;
> proxy_set_header Host $host;
> proxy_set_header X-Forwarded-For >$proxy_add_x_forwarded_for;
> proxy_connect_timeout 30;
> proxy_send_timeout 30;
> }
> 
> ```
> 
> }  
> Have you already tried?
