Odoo comme un site web standard

Par défaut Odoo fonctionne à travers le port 8069.
Donc pour accéder au serveur, on doit utiliser domain:8069.
Pour y accéder en utilisant uniquement le nom de domain comme pour un site standard (surtout pour wget),

Solution : Utiliser un reverse-proxy en installant Nginx

Solution :  https://www.bvisible.ch/odoo-changer-port-8069-port-80

La méthode la plus simple reste à modifier votre Ubuntu ou se trouve votre odoo pour rediriger vos connexions sur le port 80.

  1. sudo –
  2. Editer le fichier :    $ vim /etc/rc.local
  3. Avant la ligne « exit 0 », insérer la ligne ci-dessous :
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8069 

4. Rebooter Linux et ….  KO !

Solution : surekhatech.com/blog configurer le serveur web Apache pour odoo :

First check whether apache web server is installed on your machine or not. If not installed then execute below command to installed it.

sudo apt-get update
sudo apt-get install apache2
sudo a2enmod proxy proxy_http

Now go to the directory, “/etc/apache2/sites-available” and create a file with <domain-name>.conf.  Here I am going to use “nuc.local” domain for my odoo server. So the file name will be “nuc.local.conf”. Add the below content into this file.
<VirtualHost *:80>
    ServerName nuc.local
    ServerAlias nuc.local
    ProxyPass / http://localhost:8069/
    ProxyPassReverse / http://localhost:8069/
    ProxyPreserveHost On
</VirtualHost>
After adding the virtual host for odoo server, you need to enable site using the following command.
sudo a2ensite nuc.local.conf
A message will appear showing that site is enabled. After that you need to restart the apache server by executing below command.
sudo service apache2 restart
Make the host file entry in case you have made the configuration on the local machine. Open the “hosts” file by executing below command:
sudo nano /etc/hosts
Add the following entry into this file.
127.0.0.1 nuc.local
Retour en haut