Skip to Content
Menu
This question has been flagged

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


Avatar
Discard

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

Best Answer

Hi Mark, 

I am having the same issue, did you find the solution for it? 

Avatar
Discard
Author Best Answer

I read the response by  Cybrosys Techno Solutions Pvt.Ltd Am not too sure it was helpful.

The reverse proxy I have does work to access the site over https.  Problem is with the sitemap and address passed to paypal.  These seem to be internal issues within Odoo no?  Odoo generates and writes the sitemap correct?  And the return address that gets passed to paypal comed from odoo? 


Mark

Avatar
Discard
Author

Kayes - yes I did find a solution - it was to abandon using docker and just do a normal install of Odoo. The Odoo config file need a setting to tell it it is operating in a reverse proxy scenario. I can't quite remember something like proxy = 1. I searched and searched but could find no way to pass that setting to the Odoo installation from the Docker configs...

Related Posts Replies Views Activity
0
Apr 25
837
1
May 24
3119
1
Apr 24
2050
0
Apr 24
1539
1
May 23
4557