Reverse Proxy to Odoo 14 redirects to DSM

Currently reading
Reverse Proxy to Odoo 14 redirects to DSM

Hi Rusty,
Thanks for taking the time to reply to me.
Here's where I stand right now:
  • Got Odoo in a Docker container, PostgreSQL in another one;
  • Local access (i.e. 192.168.0.199:8069) works just fine.
  • Got an nginx container - working fine
  • I don't know, however, how to link nginx to that Odoo container and apply the specific Odoo nginx config
  • I've also installed Portainer and Nginx Proxy Manager, but I don't know if these two can help in any way with the specific configs.
What I'd like is to be able to access Odoo over a secure internet connection, through a Reverse Proxy.
 
Hi Rusty,
Thanks for taking the time to reply to me.
Here's where I stand right now:
  • Got Odoo in a Docker container, PostgreSQL in another one;
  • Local access (i.e. 192.168.0.199:8069) works just fine.
  • Got an nginx container - working fine
  • I don't know, however, how to link nginx to that Odoo container and apply the specific Odoo nginx config
  • I've also installed Portainer and Nginx Proxy Manager, but I don't know if these two can help in any way with the specific configs.
What I'd like is to be able to access Odoo over a secure internet connection, through a Reverse Proxy.
Have you tried using the built in RP from Synology (application portal)?

Have you tested outside access (outside your LAN)? How about inside access using your public name?
 
I have tried the built-in RP and it doesn't work - when I set odoo.domain.com:443 to lead to localhost:8069, I get an error with Synology's logo and a message that the page doesn't exist. Going to 192.168.0.199:8069, however, produces Odoo without any issues.

I have used RP for several other Docker-contained services, such as Jellyfin and they are accessible over the internet without any issues.

Odoo seems to need a special setup, as described here, which I don't know how to accomplish on Synology.
 
That would be massively appreciated, Rusty! Like I said, I'd be more than happy to compensate you for your efforts, so let me know.
 
Screenshot 2020-11-03 at 11.48.43.png


Zero problems with the built-in RP on Synology. Got it running 1st go. Nothing special regarding configuration and no special custom headers for the entry, it just works.
 
Colour me impressed - I don't know how, but I just set up a new subdomain, got a new Let's Encrypt certificate, did a new RP and... Odoo works!

Thank you for your support and sorry for wasting your time.
 
Colour me impressed - I don't know how, but I just set up a new subdomain, got a new Let's Encrypt certificate, did a new RP and... Odoo works!

Thank you for your support and sorry for wasting your time.
Sorry for the late reply just got back.

So you set up a new subdomain on the same root domain (same provider)? Haven't changed anything on that part?

The reason I am asking is that it is odd that before you had problems landing on Synology page cannot be found. This would mean that domain and RP have done their part and landed you on a site that it was not configured properly in LAN. Just find it odd that a subdomain name fixed this.

Would be interesting to see nginx error.log file from the time there was a problem. Wondering what error type it was reporting.
 
Seems I am running into the same problem as @zkvvoob with my installation of odoo.
Unfortunately I can not solve the issue by creating a new subdomain and/or certificate.

odoo was installed via docker including Postgres database depency.
I can access my installation by http://IP-OF-NAS:8069
This even works remotely.

But when trying to access odoo by its own domain name I am redirected to Synology Web Station Error Message 404.
All my other containers do work fine using the following method:

  1. create docker container
  2. create subdomain.TLD
  3. create Let's-Encrypt SSL certificate for subdomain in DSM
  4. add reverse proxy configuration for subdomain.TLD to localhost:8069
  5. apply correct certificate for application under "configure" in DSM
Was thinking maybe the Synology wildcard certificate might circumvent the issue, but had no luck.
I even tried registering another domain by a different registrar, without success.

When changing proxy_mode = True in odoo.conf this also does not help.

When trying to access /var/log/nginx/error.log via SSH I am getting permission errors for folder /log/

Any idea how to continue, @Rusty maybe?
 
When trying to access /var/log/nginx/error.log via SSH I am getting permission errors for folder /log/
SSH as root using “sudo -i” to elevate to root permissions then examine the logs.

As I recall there was nothing special that needs to be configured on the RP side to make it work. If you are at 404, could it mean that your container is running on a different port then configured?

Can you share your docker-compose or general settings for the container?
 
SSH as root using “sudo -i” to elevate to root permissions then examine the logs.

As I recall there was nothing special that needs to be configured on the RP side to make it work. If you are at 404, could it mean that your container is running on a different port then configured?

Can you share your docker-compose or general settings for the container?
Tanks for giving some directions.
port configuration seems to be correct, as far as I can tell. I am using port 8069, which is used by default. Also reverse proxy is configured accordingly.

In /var/log/nginx/error.log I can not find any entries related to the issue.

docker-compose
Code:
version: '3'
services:
  web:
    image: odoo
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
    - /volume1/docker/odoo/web-data:/var/lib/odoo
    - /volume1/docker/odoo/config:/etc/odoo
    - /volume1/docker/odoo/addons:/mnt/extra-addons
  db:
    image: postgres:latest
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - /volume1/docker/odoo/db-data:/var/lib/postgresql/data/pgdata
volumes:
  web-data:
  db-data:
 
Tanks for giving some directions.
port configuration seems to be correct, as far as I can tell. I am using port 8069, which is used by default. Also reverse proxy is configured accordingly.

In /var/log/nginx/error.log I can not find any entries related to the issue.

docker-compose
Code:
version: '3'
services:
  web:
    image: odoo
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
    - /volume1/docker/odoo/web-data:/var/lib/odoo
    - /volume1/docker/odoo/config:/etc/odoo
    - /volume1/docker/odoo/addons:/mnt/extra-addons
  db:
    image: postgres:latest
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - /volume1/docker/odoo/db-data:/var/lib/postgresql/data/pgdata
volumes:
  web-data:
  db-data:
Well of the bat, I can't see any problems with the stack. It explains why it all works fine locally. So this is an RP issue.

Have you checked all the nginx logs apart from the error one? Maybe you could check those as well?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
Does this only happen when you try to access packages via the 'office' links in Drive's menu? And have you...
Replies
1
Views
1,044
  • Question
Ofc you can make a single compose for this no problem. Personally I like to separate front end apps from...
Replies
10
Views
1,653
  • Solved
I think it was point 1 that was messing me up. And it was a simple fix, honestly. We'll have to see if I...
Replies
3
Views
1,951
  • Solved
yes you can fullchain + privkey would be a better option
Replies
21
Views
4,614

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top