Python / Odoo Developer

Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

Apache + Odoo

Avatar
Administrator

Open 

  1.  sudo apt-get install apache2

  2. sudo a2enmod proxy proxy_http

  3. Now go to the directory, “/etc/apache2/sites-available” and create a file with <domain-name>.conf.  Here I am going to use “demo.surekhatech.com” domain for my odoo server. So the file name will be “demo.surekhatech.conf”. Add the below content into this file.

<VirtualHost *:80>

    ServerName demo.surekhatech.com

    ServerAlias demo.surekhatech.com


    LogLevel warn

    ErrorLog /var/log/apache2/demo.surekhatech.com.error.log

    CustomLog /var/log/apache2/demo.surekhatech.com.access.log combined


    ProxyPass / http://localhost:8069/

    ProxyPassReverse / http://localhost:8069/

</VirtualHost>

  1. After adding the virtual host for odoo server, you need to enable site using the following command.

  2. sudo a2ensite demo.surekhatech.conf

  3. sudo service apache2 restart

  4. vim /etc/hosts

  5. Add to the file 127.0.0.1 demo.surekhatech.com

If you need to use SSH keys see the article


Create SSH Key

openssl req -newkey rsa:2048 -nodes -keyout pydeveloper.tk.key -out pydeveloper.tk.csr

Create Certificate

openssl req -newkey rsa:2048 -nodes -keyout domain.key -x509 -days 365 -out domain.crt 

Enable ssl

a2enmod ssl

Setup SSH in /etc/apache2/sites-available/demo.surekhatech.com adding

<VirtualHost *:443>
     ServerName demo.surekhatech.com
     ServerAlias demo.surekhatech.com
     LogLevel warn
     ErrorLog /var/log/apache2/demo.surekhatech.com.error.log
     CustomLog /var/log/apache2/demo.surekhatech.com.access.log combined
     SSLEngine on
     SSLProxyEngine on
     SSLCertificateFile /etc/apache2/ssl/demo.surekhatech.com.cert
     SSLCertificateKeyFile /etc/apache2/ssl/demo.surekhatech.com.key
     ProxyPreserveHost On
     ProxyPass / http://localhost:8069/ retry=0
     ProxyPassReverse / http://localhost:8069/
</VirtualHost>

Restart Apache

service apache2 restart




Complete guide:

https://computingforgeeks.com/how-to-install-odoo-on-debian-10-linux/


https://antiun.github.io/odoo-reverse-proxy-howto

Avatar
Abbandona