Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3886 Lượt xem

Hi 

I Have an odoo 17 CE installed on Ubuntu 22.04 docker environment. This is the installation guide I followed from digital ocean: https://www.digitalocean.com/community/tutorials/how-to-install-odoo-with-docker-on-ubuntu


Now, the issue is when I check the sitemap.xml file, I can see all the URLs are like this instead of my domain name: 

http://localhost:8069/
http://localhost:8069/contactus
http://localhost:8069/about

But I can use the domain to log in to the odoo backend.


I did set up the odoo.conf file in this location /etc/nginx/sites-available/odoo.conf, and it looks like this now:

server {
    server_name  domain.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 $host;
      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/domain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/domain.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 = domain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen       80;
    listen       [::]:80;
    server_name  domain.com;
    return 404; # managed by Certbot


}


What should I do to make the site map from this : 

http://localhost:8069/about-us
http://localhost:8069/contactus
http://localhost:8069/privacy


to this 

https://domain.com/about-us
https://domain.com/contactus
https://domain.com/privacy




Any suggestion? 


Regards

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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


Hope it helps

Ảnh đại diện
Huỷ bỏ
Tác giả

Thanks for your reply. But I checked and tried this blog post before even posting here. This solution does not work in my case, more specifically in the Docker environment.

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 24
2608
25
thg 6 20
69217
0
thg 8 25
165
4
thg 5 25
2749
2
thg 5 25
6174