This question has been flagged
5 Replies
4931 Views

I've seen a number of tutorials explaining how to set up SSL for Odoo 8 that involve editing Apache conf files or nginx conf files, but I don't have access to those. I can only access the Odoo files and files in my user directort.

This thread <https://www.odoo.com/forum/help-1/question/how-to-set-up-odoo-8-with-ssl-and-apache2-61282> talks about adding lines to odoo.conf, but I can't find the odoo.conf file.

And I've tried changing web.base.url (in System Parameters) to https, but after I log out and log back in it's always back to http again.

Avatar
Discard

a side question: How do you managed to install odoo on the shared hosting?

if odoo.conf does not exist, you can create one. then pass to odoo the option: --config=/path/to/odoo.conf

Author

My web host is Webfaction, and it's shared hosting but with lots of options, not like most shared hosting which is very restrictive. So I installed Odoo8 as a "custom app listening on port" 8069. Then I installed a private instance of postgreSQL. Odoo works fine, but a little slow so far. I need to try to optimize it.

Author Best Answer

Thank you. I managed to get SSL working, but not in the traditional way — it's kind of a hack: I set up an .htaccess file on the http:// version of the URL that says:

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

And I think it's working properly, because I'm not getting any browser warnings about insecure content. This particular RewriteCond using HTTP:X-Forwarded-SSL is recommended by my host, Webfaction.

I did locate a configuration file called .openerp_serverrc at the path ~/$HOME/.openerp_serverrc and I set the proxy_mode = True

I did not set up a private Apache or Nginx server for the installation of Odoo, but the way Webfaction works, the Odoo site is automatically being served by Nginx.

Avatar
Discard

This looks like Apache vhost definition to me (just a sidenote). However, using .htaccess is not a hack, but the proper way when you do not have an open system provided by your hoster.

Best Answer

Depending on how you installed Odoo, the name of your "odoo.conf" can also be openerp-server.conf and it can be located in /etc/odoo directory for example.

There you need the following entry: proxy_mode = True

However, this does not help if you do not have enough access rights to your server in order to complete all necessary steps to install and set up your Apache or Nginx server. So you should revert to your hosting provider to get the necessary help.

Avatar
Discard