Hi - I have two issues that are causing me grief. Am running Odoo 16 Community in a docker environment with nginx on Ubuntu 20.04.
1. The generated sitemap has addresses
using localhost:8069 instead of my domain name.
http://localhost:8069/website/infohttp://localhost:8069/eventshttp://localhost:8069/termshttp://localhost:8069/blog
2 - I have installed Paypal module to handle website payments and everything works except the return address from paypal also has localhost:8069 as the address, despite me manually putting a return address in my Paypal account setup.
I have set the system parameter to my domain name and added the freeze parameter, this has had no effect on either issue.
From searching the only thing I think it could be is there is something wrong with the reverse proxy setup in nginx, though my gut says both these problems are coming from Odoo not the web server. Here is my odoo.conf file:
server {
server_name mydomain.com;
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host mydomain.com;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://localhost:8069;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mydomain.com/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
}
server {
if ($host = mydomain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name mydomain.com;
return 404; # managed by Certbot
}
Anything wrong here?
For for the sitemap I have tried deleting the sitemap-1.xml attachment, it always regenerates a new sitemap, still with the localhost addresses!
Any help would be appreciated!
Thanks,
Mark
Hi,
Please go through our blog How to Configure Odoo with Nginx as Reverse Proxy
https://www.cybrosys.com/blog/how-to-configure-odoo-with-nginx-as-reverse-proxy