pmg reverse_proxy

rickygm

Renowned Member
Sep 16, 2015
129
6
83
Hi , I am trying to put a reverse proxy with nginx in front of my pmg, I have it working halfway, if I already want to see the quarantine of a user it sticks, I cannot do searches , he stays searching .

upstream backend5 {

server 192.168.11.11:8006; ## pmg
keepalive 2;


}

location / {

proxy_http_version 1.1;

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection "upgrade";

proxy_set_header Host $http_host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forward-Proto http;

proxy_set_header X-Nginx-Proxy true;

proxy_buffering off;

client_max_body_size 0;

proxy_connect_timeout 3600s;

proxy_read_timeout 3600s;

proxy_send_timeout 3600s;

send_timeout 3600s;

proxy_pass https://backend5;


}


location ~ /proxmoxlib.js$|/favicon.ico$|/pve2/|/fontawesome/|/framework7/|/pwt/css/ {

proxy_pass https://backend5;


}


location /quarantine {

proxy_pass https://backend5;


}


location /api2 {

location ~ /api2/(extjs|json|htmlmail)/(access/ticket$|version$) {

proxy_pass https://backend5;


}


location ~ /api2/(extjs|json|htmlmail)/nodes/.+/subscription$ {


proxy_pass https://backend5;


}

location ~ /api2/(extjs|json|htmlmail)/quarantine {


proxy_pass https://backend5;

}


location ~* ^/pve2/(?<file>.*)$ {

gzip_static on;

root /usr/share/pve-manager;

try_files /$file backend5;

}
return 403;


}


}

any advice idea?
 

Attachments

  • Captura de Pantalla 2020-06-07 a la(s) 17.39.12.png
    Captura de Pantalla 2020-06-07 a la(s) 17.39.12.png
    69 KB · Views: 10
Do you have an adblocker running? Those usually recognize the tracking center falsely as advertisement.
 
  • Like
Reactions: Stoiko Ivanov
Do you have an adblocker running? Those usually recognize the tracking center falsely as advertisement.

Hi , I don't have it, I think the problem is the reverse proxy configuration, in the logs I see that it makes a call to / api2

look the logs:
Code:
 [07/Jun/2020:17:24:28 -0600] "POST /api2/json/access/ticket HTTP/2.0" 200 502 "https://mspam.domain.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"
 [07/Jun/2020:17:32:57 -0600] "GET /api2/extjs/version?_dc=1591572795449 HTTP/2.0" 200 76 "https://maspam.domain.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!