Enable SSL for Flectra on Apache


#1

I just downloaded Flectra for our sales and accounting group to try. I have Flectra installed on a TurnkeyLinux LAPP virtual machine. All is working correctly: http://myservername:7073. I need to allow other remote users access, so I need to make sure everyone accessing the server is secure. I’ve already created and installed a CA cert on the server and able to connect securely to the server via port 443

I’ve “googled” but could only find information on setting SSL on NGIX but have not seen any on Apache. I’ve tried using different configurations/methods from people deploying Odoo but was not successful. Is there a link anyone can send me that can help me set up SSL for my server?

Any help is appreciated. Thank you


#6

Ok, I found the solution and have tried multiple times to paste the instructions, but the page keeps messing up the alignment. And since some of the lines looks like code, the page starts putting bold and skip certain line items. Also, somehow, the page treats “//” in my solution as links, so it limits me to 2 links per reply. I give up. If someone can tell me how to turn this to just raw text, I will try to post the solution again.


#7

make sure that you have the https url correctly set in the parameters :
|Key|web.base.url|
|Value|https://foo.bar.org/|

I use LetsEncrypt standard setup for Apache. It will redirect all http to https and make a file file name like www.yourflectrasite.org-le-ssl.conf Then here’s an example of one of my sites for Flectra. Make sure that the longpolling lines come 1st before the ProxyPass for / or else things will behave incorrectly:

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName www.yourflectrasite.org
DocumentRoot /var/www/html
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyRequests Off
ProxyTimeout 18000
KeepAlive On
ProxyVia full
ProxyPreserveHost On

ProxyPass /longpolling/ http://127.0.0.1:7272/longpolling/
ProxyPassReverse /longpolling/ http://127.0.0.1:7272/longpolling/
ProxyPass / http://127.0.0.1:7273/
ProxyPassReverse / http://127.0.0.1:7273/

<Location />
Order allow,deny
Allow from all
</Location>

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/www.yourflectrasite.org/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.yourflectrasite.org/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.yourflectrasite.org/chain.pem
</VirtualHost>

</IfModule>