This question has been flagged
2 Replies
4744 Views

Hello,

I have a problem with wkhtmltopdf on my server on my Ubuntu 16.04 and Odoo 11.
When I connect directly to the whhtmltopdf server works normally.
When I connect to Odoo via the reverse proxy (ngnix), I get a completely empty error message and no PDF.
The proxy backhand is on a separate machine with Ubuntu 18
The reversproxy is in https.

The configuration of my reversproxy is as follows:


upstream odoo_monsite {
server localIP:8069;
}

server {
server_name odoo.monsite.ch;

access_log /var/log/nginx/odoo.monsite.ch.access.log;
error_log /var/log/nginx/odoo.monsite.ch.error.log;

proxy_buffers 16 64k;
proxy_buffer_size 128k;

client_max_body_size 50M;


location / {
proxy_pass http://odoo_monsite;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;

proxy_connect_timeout 30;
proxy_send_timeout 30;

}



listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/odoo.monsite.ch/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/odoo.monsite.ch/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 = odoo.monsite.ch) {
return 301 https://$host$request_uri;
} # managed by Certbot


server_name odoo.monsite.ch;
listen 80;
return 404; # managed by Certbot


}



Thank you for your help


Avatar
Discard
Best Answer

As you did not mention the problem you are facing, I can only guess: did you properly setup your system parameters for web.base.url and report.url?

See https://www.odoo.com/forum/help-1/question/how-to-change-the-value-of-web-base-url-to-get-the-correct-header-footer-css-82516 and https://stackoverflow.com/questions/47055149/why-my-pdf-report-is-not-taking-the-css-styles-well-in-odoo?rq=1 for example.

Avatar
Discard
Author Best Answer

Thank you for your answer.


When I connect directly to odoo without the reverse_proxy my prints are correctly formatted.

It is when I connect through the reverse_proxy that the empty error message appears.


Thank you in advance

Avatar
Discard

You have already said that. You did not provide any more information nor a feedback to the suggestions made. That way it is difficult to get help.

Author

I didn't modify these files

web.base.url

report.url