ServerAdmin webmaster@example.com
ServerName odoo.example.com
RewriteEngine On
# Permanent redirect (301 HTTP) if no canonical domain name
RewriteCond %{HTTP_HOST} !^odoo.example.com
RewriteRule ^/(.*)$ http://odoo.example.com/$1 [R=301,NE,L]
# Redirect 301 to HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,NE,L]
Order deny,allow
Deny from all
Allow from all
ErrorLog /var/log/apache2/odoo.example.com.error.log
LogLevel warn
CustomLog /var/log/apache2/odoo.example.com.access.log combined