Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

wkhtmltopdf through reversproxy

Subscribe

Get notified when there's activity on this post

This question has been flagged
reverse_proxywkhtmltopdfNgnix
2 Replies
7071 Views
Avatar
Michel Barras

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


0
Avatar
Discard
Avatar
Ermin Trevisan
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.

1
Avatar
Discard
Avatar
Michel Barras
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

0
Avatar
Discard
Ermin Trevisan

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.

Michel Barras
Author

I didn't modify these files

web.base.url

report.url

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Can Nginx block wkhtmltopdf creating Qweb report?
wkhtmltopdf Ngnix
Avatar
Avatar
Avatar
2
Sep 19
6187
Odoo #V17 and #V18 QWeb template with web.internal_layout : the report throws the error UserError odoo.exceptions.UserError #Wkhtmltopdf failed (error code : -10)
wkhtmltopdf
Avatar
0
Mar 25
3919
ir_actions_report.py in _run_wkhtmltopdf raise UserError odoo.exceptions.UserError Wkhtmltopdf failed ( error code : -10)
wkhtmltopdf
Avatar
1
Mar 25
3798
PDF report not rendering header/partner details correctly. Solved
wkhtmltopdf
Avatar
Avatar
Avatar
2
Jul 24
5857
wkhtmltopdf - How to enable local file system access Solved
wkhtmltopdf
Avatar
1
May 24
5249
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now