...
fastcgi_param HTTPS 'on';
4. Optionally, redirect all traffic from port 80 to 443.
To do that, add following lines a the top of /etc/nginx/conf.d/main.conf
Code Block | ||
---|---|---|
| ||
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
} |
5. Restart webserver & php-fpm:
...