December 2018
Beginner to intermediate
404 pages
10h 14m
English
Now that we have an SSL certificate, we're ready to configure nginx to use it. To enforce HTTPS, we need to redirect all HTTP traffic. Replace the server directive we defined previously with the following code:
server {
listen 80;
rewrite ^(.*) https://$host$1 permanent;
}
Now, if we reload the nginx configuration and access the server with a web browser, we'll see that the http:// address has been converted into an https:// address.
However, this address won't return any content until we configure the HTTPS service properly; this can be done by adding the following server configuration:
server { listen 443; # Add Headers for odoo proxy mode proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-For ...Read now
Unlock full access