• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Plesk Odoo Nginx Reverse Proxy

trinanda

New Pleskian
In general Nginx configuration I use this configuration for Nginx reverse proxy to Odoo:

upstream odoo12a {
server 127.0.0.1:8012;
}

upstream odoo12a-im {
server 127.0.0.1:8072;
}

server {
listen 80;
server_name www.domain.com;
rewrite ^(.*) https://$host$1 permanent;
}

server {
listen 443;
server_name www.domain.com;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
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 on;
ssl_certificate /etc/letsencrypt/live/www.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.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

access_log /var/log/nginx/www_domain_com_odoo_access.log;
error_log /var/log/nginx/www_domain_com_odoo_.error.log;

location /longpolling {
proxy_pass http://odoo12a-im;
}

location / {
proxy_redirect off;
proxy_pass http://odoo12a;
}

location ~* /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo12a;
}

gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
gzip on;
}

But I don't know how achieve the same functionality with Plesk?, So the point of my question is how to create Nginx reverse proxy to the Odoo?

Thanks,
Tri
 
I installed odoo 17 under Plesk and slove the Mixed Content problem.

1.install odoo and db per docker-compose as usual. Mapped 8469 port.
2.activ Proxy mode in odoo.conf
3.add new domain in Plesk
4.setup ssl useing Let's Encrypt.
5.in "Apache & nginx" deaktive Proxy mode
6.in "Additional nginx directives" add:
location ~ ^/.* {
proxy_pass http://0.0.0.0:8469 #for me in plesk, ip is 0.0.0.0 is .not 127.0.0.1
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;
}
longpoing and cache i have not added, you can try it.

Then odoo works perfectly and no Mixt content problem now.

hope i can help you some
 
In general Nginx configuration I use this configuration for Nginx reverse proxy to Odoo:

upstream odoo12a {
server 127.0.0.1:8012;
}

upstream odoo12a-im {
server 127.0.0.1:8072;
}

server {
listen 80;
server_name www.domain.com;
rewrite ^(.*) https://$host$1 permanent;
}

server {
listen 443;
server_name www.domain.com;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
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 on;
ssl_certificate /etc/letsencrypt/live/www.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.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

access_log /var/log/nginx/www_domain_com_odoo_access.log;
error_log /var/log/nginx/www_domain_com_odoo_.error.log;

location /longpolling {
proxy_pass http://odoo12a-im;
}

location / {
proxy_redirect off;
proxy_pass http://odoo12a;
}

location ~* /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo12a;
}

gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
gzip on;
}

But I don't know how achieve the same functionality with Plesk?, So the point of my question is how to create Nginx reverse proxy to the Odoo?

Thanks,
Tri
I need to install Odoo in plesk with a docker, but I'm having problems.
What method do you use to install Odoo?
I'm not sure what variables I should set, I can't find any information.
 

Attachments

  • Captura de pantalla 2024-01-04 134454.png
    Captura de pantalla 2024-01-04 134454.png
    50.4 KB · Views: 21
  • Captura de pantalla 2024-01-04 135833.png
    Captura de pantalla 2024-01-04 135833.png
    39.3 KB · Views: 16
I need to install Odoo in plesk with a docker, but I'm having problems.
What method do you use to install Odoo?
I'm not sure what variables I should set, I can't find any information.
For me the docker-compose.yaml is:
version: '3.1'
services:
web:
image: odoo:17.0
depends_on:
- db
ports:
- "8469:8069" #you an chang it
- "8072:8072" #for live chat
volumes:
- odoo-web-data:/var/lib/odoo
- /root/odoo17/config:/etc/odoo
- /root/odoo17/addons:/mnt/extra-addons
environment:
- PASSWORD_FILE=/run/secrets/postgresql_password
secrets:
- postgresql_password
db:
image: postgres:15
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD_FILE=/run/secrets/postgresql_password
- POSTGRES_USER=odoo
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- odoo-db-data:/var/lib/postgresql/data/pgdata
secrets:
- postgresql_password
volumes:
odoo-web-data:
odoo-db-data:

secrets:
postgresql_password:
file: odoo_pg_pass
AND creat a file with filename odoo_pg_pass in the same fold of odoo, fill your pg password in the file.
1706860670619.png
AND don't forget to creat a odoo.conf in config fold.
[options]
proxy_mode = True
addons_path = /mnt/extra-addons
limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8196
limit_time_cpu = 60
limit_time_real = 1200
max_cron_threads = 1
workers = 4
interface = localhost
secure = False
longpolling_port = 8072
THEN run docker-compose up -d

After that, you can use Plesk "Docker Proxy Rules" to map the Port to Domain. then you can access odoo the your domain.
BUT for this method, a always get Mixed Content problem.

So i don't use "Docker Proxy Rules", but use the method that a writed befor:
I installed odoo 17 under Plesk and slove the Mixed Content problem.

1.install odoo and db per docker-compose as usual. Mapped 8469 port.
2.activ Proxy mode in odoo.conf
3.add new domain in Plesk
4.setup ssl useing Let's Encrypt.
5.in "Apache & nginx" deaktive Proxy mode
6.in "Additional nginx directives" add:

longpoing and cache i have not added, you can try it.

Then odoo works perfectly and no Mixt content problem now.

hope i can help you some
 
For me the docker-compose.yaml is:

AND creat a file with filename odoo_pg_pass in the same fold of odoo, fill your pg password in the file.
View attachment 25430
AND don't forget to creat a odoo.conf in config fold.

THEN run docker-compose up -d

After that, you can use Plesk "Docker Proxy Rules" to map the Port to Domain. then you can access odoo the your domain.
BUT for this method, a always get Mixed Content problem.

So i don't use "Docker Proxy Rules", but use the method that a writed befor:
Thank you very much, but what I was looking for was how to be able to do it without having to access the terminal.

I think I am forced to create an odoo container and a postgre container.

How can I configure them on the same network without needing to access via terminal?
 
Back
Top