Page tree
Skip to end of metadata
Go to start of metadata

To install valid SSL Certificate on VPS/Server where HostBill Enterprise is installed:

1. SSH to your HostBill Enterprise server as root:

# ssh root@yourhostbilladdress

2. Edit file:

# nano /etc/nginx/conf.d/main.conf
  • Change server_name to domain name that you have issued certificate for.
  • Change "listen 80;" to "listen 443;"
  • Add line "ssl on;"
  • Provide path to your certificate and private key files like:
    ssl    on;
    ssl_certificate    /etc/ssl/your_domain_name.pem; 
    (or bundle.crt)
    ssl_certificate_key    /etc/ssl/your_domain_name.key;
  •  Save changes

3. Edit file: /etc/nginx/locations/hostbill.conf

# nano /etc/nginx/locations/hostbill.conf

Below line "fastcgi_pass;" paste:

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

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
  • No labels