Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

-1

How to force SSL in Odoo8 on CentOS shared hosting?

By
Peter A
on 8/2/15, 9:29 AM 1,007 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.

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

Temur
on 8/3/15, 2:24 AM

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

Temur
on 8/3/15, 2:28 AM

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.

Peter A
on 8/3/15, 9:49 AM
1
Peter A
On 8/3/15, 9:57 AM

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.

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.

Ermin Trevisan
on 8/4/15, 2:39 AM
1

Ermin Trevisan

--Ermin Trevisan--
3548
| 6 3 7
Walchwil, Switzerland
--Ermin Trevisan--


Ermin Trevisan
On 8/3/15, 5:11 AM

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.

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!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/2/15, 9:29 AM
Seen: 1007 times
Last updated: 8/3/15, 10:28 AM