Rahul R

Jan 312 min

How to Set Up Odoo with Apache Reverse Proxy on Ubuntu

Welcome, adventurous souls, to the whimsical world of Odoo installation! In this zany tutorial, we'll embark on a wild journey to set up Odoo, the beloved open-source ERP software, with an Apache reverse proxy on Ubuntu. Buckle up, because things are about to get quirky!

Step 1: PostgreSQL Installation Extravaganza

Let's kick things off with a bang by installing PostgreSQL, the trusty database engine that'll power our Odoo adventure. Open your terminal and unleash the magic incantation:

sudo apt install postgresql -y

Step 2: Summoning the Sorcery of wkhtmltopdf

Now, let's conjure up wkhtmltopdf, the mystical tool that'll transform our HTML incantations into beautiful PDF spells. Prepare your repository spells and cast them with finesse:

sudo apt-get install -y fontconfig libjpeg-turbo8 xfonts-75dpi
 
wget -q -O - https://nightly.odoo.com/odoo.key | sudo gpg --dearmor -o /usr/share/keyrings/odoo-archive-keyring.gpg
 
echo 'deb [signed-by=/usr/share/keyrings/odoo-archive-keyring.gpg] https://nightly.odoo.com/17.0/nightly/deb/ ./' | sudo tee /etc/apt/sources.list.d/odoo.list
 
sudo apt-get update && sudo apt-get install odoo

Step 3: Apache2 - The Noble Steed

Ah, Apache2, the gallant steed of the web server realm! Let's saddle up and ride into the sunset of web hosting glory:

sudo apt install apache2

Step 4: Crafting the Apache Reverse Proxy Spell

It's time to weave our Apache reverse proxy magic! Grab your wizard's hat and concoct the spell within the mystical confines of your favorite text editor:

sudo nano /etc/apache2/sites-available/odoo.conf

Now, sprinkle some Apache configuration fairy dust into your odoo.conf:

<VirtualHost *:80>
 
ServerName your_domain.com
 
ProxyPass / http://localhost:8069/
 
ProxyPassReverse / http://localhost:8069/
 
<Proxy *>
 
Order deny,allow
 
Allow from all
 
</Proxy>
 
ErrorLog ${APACHE_LOG_DIR}/odoo-error.log
 
CustomLog ${APACHE_LOG_DIR}/odoo-access.log combined
 
</VirtualHost>

Step 5: Enchanting Apache with Your Proxy Magic

With a flick of your wand (or just a simple command), enable your newfound Apache configuration:

sudo a2ensite odoo.conf
 
sudo systemctl restart apache2

Step 6: Unleash Odoo's Magic

Now, don your adventurer's cap and embark on a quest to access Odoo using your domain name in a web browser. The realm of ERP wonders awaits!

Pro Tip: Don't forget to configure PostgreSQL with a user and database for Odoo. And remember, adjust the Odoo version and branch as needed to suit your epic quest!

Congratulations, brave souls! You've successfully embarked on a whimsical adventure to set up Odoo with an Apache reverse proxy on Ubuntu. May your ERP journey be filled with magic, laughter, and the occasional bug-fixing potion. Until next time, happy Odoo-ing! 🚀

    30
    0