Answer the question
In order to leave comments, you need to log in
How not to pass location to nginx?
Hello.
I'm proxying, I'm proxying, but it's not being proxied.
Here is the config I have:
upstream proxmoxvar {
ip_hash;
server XXX.XX.XXX.XX:8006;
keepalive 1;
}
server {
listen 80;
server_name mgmt.somedomain.corp;
return 301 https://$server_name$request_uri;
}
server {
server_name mgmt.somedomain.corp;
listen 443;
ssl on;
ssl_certificate /etc/letsencrypt/live/mgmt.somedomain.corp/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mgmt.somedomain.corp/privkey.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_stapling on;
ssl_stapling_verify on;
add_header Strict-Transport-Security "max-age=604800; includeSubDomains; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
proxy_redirect off;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
location / {
proxy_set_header X-Forwarded-Proto https;
proxy_pass https://proxmoxvar;
proxy_http_version 1.1;
proxy_set_header Connection $http_connection;
proxy_set_header Origin http://$host;
proxy_set_header Upgrade $http_upgrade;
}
}
location /proxmox {
proxy_set_header X-Forwarded-Proto https;
proxy_pass https://proxmoxvar;
proxy_http_version 1.1;
proxy_set_header Connection $http_connection;
proxy_set_header Origin http://$host;
proxy_set_header Upgrade $http_upgrade;
}
Answer the question
In order to leave comments, you need to log in
Replace
proxy_pass with https://proxmoxvar;
on
proxy_pass https://proxmoxvar/;
In the console it says "$ is not defined", jQuery seems to be badly connected)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question