OpenERP 7 with SSL on Ubuntu 12.04
Lets assume that apache and required packages are installed on system.
There are some commands needs to execute to run OpenERP on SSL.
sudo apt-get install apache2
sudo a2enmod ssl proxy_http headers rewrite
Now we have created certificate and key so we have to execute these commands one by one.
sudo mkdir /etc/ssl/openerp
openssl genrsa -des3 -out oeserver.pkey 1024
openssl rsa -in oeserver.pkey -out oeserver.key
openssl req -new -key oeserver.key -out oeserver.csr
At last we signed certificate here.
openssl x509 -req -days 365 -in oeserver.csr -signkey oeserver.key -out oeserver.crt
We also created apache configuration file.
sudo vim /etc/apache2/sites-available/openerp
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/openerp/oeserver.crt
SSLCertificateKeyFile /etc/ssl/openerp/oeserver.keyProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy *>
ProxyVia On
ProxyPass / http://127.0.0.1:8078/
<location />
ProxyPassReverse /
</location>RequestHeader set “X-Forwarded-Proto” “https”
SetEnv proxy-nokeepalive 1
</VirtualHost>
Now enable above configuration execute below command
sudo a2ensite openerp
After above configuration, just restart OpenERP server and use this URL to test: https://127.0.0.1
Thank you for this useful tutorial
There is a typo in your script should be
Hi what is the typo? I can’t really see it. Copying the script and restarting apache has hit me with a
apache2: Syntax error on line 268 of /etc/apache2/apache2.conf: Syntax error on line 12 of /etc/apache2/sites-enabled/openerp: directive missing closing ‘>’
Action ‘configtest’ failed.
error. Please advice.
Thank you.
the tag must be changed in (remove the star)
Excellent – thank you! There’s a light typo: should be .
Perfect Thank you !
Hi, when i try the command “sudo a2ensite openerp”, I get “Site openerp does not exist!”
sites in /etc/apache2/sites-available must have .conf extension.
rename openerp in openerp.conf:
sudo mv /etc/apache2/sites-available/openerp /etc/apache2/sites-available/openerp.conf
see http://serverfault.com/questions/528502/a2ensite-error-site-not-exist-when-creating-virtualhost-apache2-on-ubuntu
Please note that the default port OpenERP is listening on is 8069.
So in case of faults try changing the directive
ProxyPass / http://127.0.0.1:8078/
into
ProxyPass / http://127.0.0.1:8069/
its not working for me in Chrome. and in Safari I have to type explicitly https://ip in order to get to the website. and it hides the https prefix. what do I do wrong?
Hi, I have the same problem
apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 11 of /etc/apache2/sites-enabled/openerp.conf: directive missing closing ‘>’
I tried removing the star, but does not work,
What is the correct syntax?
thank you
when I try to reload the apache2
i get the follow:
SSLCertificateFile: file ‘/etc/ssl/openerp/oeserver.crt’ does not exist or is empty
Where can I get this certificate?
I already resolved it the previous comments.
I have another one. =0)
when restart the apache2 I have this error.
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the ‘ServerName’ directive globally to suppress this message
what is the problem this?