HostBill Enterprise installed after 2018-03-19 already have ssl configuration stored in /etc/nginx/ssl.conf |
1. SSH to your HostBill Enterprise server as root:
# ssh root@yourhostbilladdress |
2. Edit file:
/etc/nginx/conf.d/main.conf |
# nano /etc/nginx/conf.d/main.conf |
At the very top of mentioned file add following section:
server { listen 80 default_server; listen [::]:80 default_server; server_name _; return 301 https://$host$request_uri; } |
3. Edit file: /etc/nginx/locations/hostbill.conf
# nano /etc/nginx/locations/hostbill.conf |
Below the line "fastcgi_pass 127.0.0.1:9000;" paste:
fastcgi_param HTTPS 'on';
4. Optionally, redirect all traffic from port 80 to 443.
To do that, add following lines at the top of /etc/nginx/conf.d/main.conf
server { listen 80 default_server; listen [::]:80 default_server; server_name _; return 301 https://$host$request_uri; } |
5. Restart webserver & php-fpm:
service nginx restart && service php-fpm restart |