Does anyone have an example of a working configuration with nginx reverse proxy?
What is wrong with the configuration below?
server {
listen 80;
server_name nuxeo.myserver.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name nuxeo.myserver.com;
include snippets/ssl-generic.conf;
ssl_certificate /etc/letsencrypt/live/nuxeo.myserver.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/nuxeo.myserver.com/privkey.pem;
client_max_body_size 1024M;
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
location / {
rewrite ^/(.*)$ /nuxeo/$1 last;
}
location /nuxeo/ {
proxy_pass http://10.192.65.67:8080/nuxeo/;
proxy_set_header nuxeo-virtual-host "https://$server_name/";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass_header Set-Cookie;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
proxy_buffering off;
}
}