• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Odoo Plesk Reverse Proxy

I am trying to create a reverse proxy for nginx, however I can not get it to work. Here is my config that works on ubuntu 16.04 with NGINX only


upstream odooweb {

server 0.0.0.0:8069 weight=1 fail_timeout=300s;

}

upstream odooweb-im {

server 0.0.0.0:8072 weight=1 fail_timeout=300s;

}

server {

# server port and name

listen 80;

server_name *** servers ip address ***;

# Specifies the maximum accepted body size of a client request,

# as indicated by the request header Content-Length.

client_max_body_size 200m;

#log files

access_log /var/log/nginx/odoo-access.log;

error_log /var/log/nginx/odoo-error.log;

proxy_connect_timeout 600;

proxy_send_timeout 600;

proxy_read_timeout 600;

send_timeout 600;

keepalive_timeout 600;

gzip on;

gzip_disable "msie6";

gzip_vary on;

gzip_proxied any;

gzip_comp_level 6;

gzip_buffers 16 8k;

gzip_http_version 1.1;

gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype image/bmp image/png image/gif image/jpeg image/jpg;

# increase proxy buffer to handle some odoo web requests

proxy_buffers 16 64k;

proxy_buffer_size 128k;

location / {

proxy_pass http://odooweb;

# force timeouts if the backend dies proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;

# set headers

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto http;

# by default, do not forward anything

proxy_redirect off; }

location /longpolling {

proxy_pass http://odooweb-im; }

# cache some static data in memory for 60mins.

# under heavy load this should relieve stress on the odoo web interface a bit.

location ~* /web/static/ {

proxy_cache_valid 200 60m;

proxy_buffering on;

expires 864000;

proxy_pass http://odooweb;

}

}
 
I am trying to set up the reverse proxy config for an erp software called Odoo. Since I am using Plesk I can not configure the proxy in the normal way of Ubuntu /ect/nginx/sites_enabled/...etc

seems like the configuration needs to be put directly in the plesk.
 
From what I understand, odoo brings its own web server, and you want to run it as the backend while Nginx remains the frontend and serves your odoo installation plus continues to serve Plesk virtual hosts? So you will end up with two backends, one for port 8069 (odoo) and one for 7080 and 7081 (Apache). How do you want to create the difference criteria between them? By a subdomain? Subdirectory? You need some criteria first by that Nginx can tell whether to forward the request to 8069 or to 7080.

I'd first look at this file: /etc/nginx/plesk.conf.d/server.conf . It contains the basic logic for what you want to achieve. You need to expand this with location sections that work as traffic selectors to forward odoo traffic to the odoo backend and other traffic to Apache. From there it is more or less a copy and paste operation to add another location block in the server blocks - however, this file will be overwritten by Plesk webserver reconfigurations. To prevent this, you need to either edit /usr/local/psa/admin/conf/templates/default/nginx.php or create a custom configuration file (for details see description here: [HOWTO] How to correctly modify virtual host settings ).

To be frankly honest: I'd never ever construct this mixture of Plesk and an additional web server. Looking at the number of internal tickets in our company that we have with simple default Plesk installations I don't think such modifications will promise a long living solution. It is simply too complicated and too vulnerable to failures by future updates or changes to configuration files, locations or new directives that updates might bring in.

If you absolutely want to do this, maybe you should consider running odoo in a Docker container. odoo provides a Docker image and Plesk Onyx supports Docker. This will probably be the much better approach, because it won't interfere with existing Plesk configuration files and templates.
 
From what I understand, odoo brings its own web server, and you want to run it as the backend while Nginx remains the frontend and serves your odoo installation plus continues to serve Plesk virtual hosts? So you will end up with two backends, one for port 8069 (odoo) and one for 7080 and 7081 (Apache). How do you want to create the difference criteria between them? By a subdomain? Subdirectory? You need some criteria first by that Nginx can tell whether to forward the request to 8069 or to 7080.

I'd first look at this file: /etc/nginx/plesk.conf.d/server.conf . It contains the basic logic for what you want to achieve. You need to expand this with location sections that work as traffic selectors to forward odoo traffic to the odoo backend and other traffic to Apache. From there it is more or less a copy and paste operation to add another location block in the server blocks - however, this file will be overwritten by Plesk webserver reconfigurations. To prevent this, you need to either edit /usr/local/psa/admin/conf/templates/default/nginx.php or create a custom configuration file (for details see description here: [HOWTO] How to correctly modify virtual host settings ).

To be frankly honest: I'd never ever construct this mixture of Plesk and an additional web server. Looking at the number of internal tickets in our company that we have with simple default Plesk installations I don't think such modifications will promise a long living solution. It is simply too complicated and too vulnerable to failures by future updates or changes to configuration files, locations or new directives that updates might bring in.

If you absolutely want to do this, maybe you should consider running odoo in a Docker container. odoo provides a Docker image and Plesk Onyx supports Docker. This will probably be the much better approach, because it won't interfere with existing Plesk configuration files and templates.

Hola, estoy tratando de instalar Odoo15 en un docker y no consigo realizarlo, podría indicarme los pasos a seguir?
 
Back
Top