Configuring Apache for Odoo

On Ubuntu Linux

1. Proxy mods for Apache

a2enmod proxy
a2enmod proxy_http

2. Create a config file

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

It is up to you how you name the file. Some developers give it the name of the domain, for example, Also if you want to host more than one application/website on your server it is up to you to keep the config in one file or to create many files.

3. Fill in the config file with:

<VirtualHost *:80>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
ProxyPass /
ProxyPassReverse /
<Location />
Order allow,deny
Allow from all

I don't need to mention here, that you should replace the "" with your own domain.

4. Make a shortcut to the config in "sites-enabled":

sudo ln -s /etc/apache2/sites-available/website.conf /etc/apache2/sites-enabled/website.conf

Making the shortcut is more time efficient as when you make any changes in the config file you won't need to do any additional tasks except restarting Apache. However, I have seen in my career that some previous devs instead of creating a shortcut used to copy the original file to sites-enabled. If you working after someone and you got an error during the Apache restart this might be the issue.

5. Restart Apache (please test it before restarting: apachectl configtest) :

sudo service apache2 restart