diff --git a/letsencrypt/README.rst b/letsencrypt/README.rst index 7d9e06134..9c9a186b2 100644 --- a/letsencrypt/README.rst +++ b/letsencrypt/README.rst @@ -71,7 +71,7 @@ You'll also need a matching sudo configuration, like:: your_odoo_user ALL = NOPASSWD: /usr/sbin/service nginx reload -Further, if you force users to https, you'll need something like:: +Further, if you force users to https, you'll need something like for nginx:: if ($scheme = "http") { set $redirect_https 1; @@ -83,6 +83,13 @@ Further, if you force users to https, you'll need something like:: rewrite ^ https://$server_name$request_uri? permanent; } +and this for apache:: + + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteCond %{REQUEST_URI} "!^/.well-known/" + RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] + In case you need to redirect other nginx sites to your Odoo instance, declare an upstream for your odoo instance and do something like::