Запрос на порт 8081 проксируется на localhost:9081
server {
listen 8081 ssl;
server_name work.ru;
ssl_certificate /etc/letsencrypt/live/work.ru/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/work.ru/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
access_log /var/log/nginx/work-access.log;
error_log /var/log/nginx/work-error.log;
location / {
proxy_pass http://localhost:9081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Сейчас работает только по
https://work.ru:8081, как мне перенаправить POST, PUT, GET запросы с http на https?