when i try to accesses with subdomain with port it direct me to domain.com/web/login and make another direct to /web/login without domain
when i try to accesses with domain.com/web/login it works and it works if authorized with odoo db
# odoo servers
upstream odoo {
server 127.0.0.1:8069;
}
# HTTP -> HTTPS
server {
listen 8006;
server_name server_name.com;
include snippets/letsencrypt.conf;
#return 301 https://server_name.com:8006$request_uri;
#rewrite ^(.*) https://$host$1 permanent;
return 301 https://server_name.com:8006$request_uri;
}
server {
listen [::]:443 ssl default_server;
listen 443 ssl;
server_name server_name.com;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Proxy headers
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
# SSL parameters
ssl off;
ssl_certificate /etc/ssl/server_name.crt;
ssl_certificate_key /etc/ssl/server_name.key;
# include snippets/ssl.conf;
# include snippets/letsencrypt.conf;
# log files
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
# Handle / requests
location / {
#proxy_pass https://server_name.com:8006/;
proxy_set_header Host https://server_name.com:8006/;
#proxy_redirect off;
proxy_pass http://odoo;
}