Odoo - OpenERP - How to setup or configure SSL Certificates & Website Configs for Odoo HTTPS 443 access?

Zarshed Ali
Zarshed Ali
5000
| 2 1 2
Asked on 10/8/15, 7:42 PM
0
vote
1140 Views

your own ssl cert: (or ssl cert from CA)
openssl genrsa -out privkey.pem 2048
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
copy both files to /etc/ssl/erp/

sudo a2enmod ssl
sudo a2enmod rewrite
sudo a2enmod proxy_http
sudo a2enmod headers

make a file "odoo.conf" in /etc/apache2/sites-available

cd /etc/apache2/sites-available

sudo nano odoo.conf

copy/past/edit this:

<VirtualHost *:80>
ServerName erp.your-domain.at
ServerAdmin admin@your-domain.at
Redirect permanent / https://erp.your-domain.at/
    TransferLog /var/log/apache2/transfer.erp.your-domain.at.log
</VirtualHost>

<VirtualHost *:443>
   ServerName erp.your-domain.at
   ServerAdmin admin@erp.your-domain.at
   SSLProxyEngine on
   SSLEngine on
   SSLCertificateFile /etc/ssl/erp/cacert.pem
   SSLCertificateKeyFile /etc/ssl/erp/privkey.pem
   SSLCACertificateFile    /etc/ssl/erp/cacert.pem
   RequestHeader set "X-Forwarded-Proto" "https"
   SetEnv proxy-nokeepalive 1
        ProxyPass / http://127.0.0.1:8069/
        ProxyPassReverse / http://127.0.0.1:8069/
   ProxyErrorOverride off
   TransferLog /var/log/apache2/transfer.erp.your-domain.at.log
   #Fix IE problem (httpapache proxy dav error 408/409)
   SetEnv proxy-nokeepalive 1
</VirtualHost>

YOU MUST change the path to your ssl certificate + the domain
your ports.conf (in apache2 dir) should look like this (on debian7):

NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
NameVirtualHost *:443    
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

then:
sudo a2ensite odoo
sudo service apache2 restart

Zarshed Ali
Zarshed Ali
5000
| 2 1 2
Answered on 10/8/15, 7:47 PM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This forum is for HiTechnologia Employees & just Odoo general knowledge purpose only.

Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 10/8/15, 7:42 PM
Seen: 1140 times
Last updated: 10/8/15, 7:47 PM