Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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;
  • At very top of mentioned file add following section:

    Code Block
    languagetext
    server {
    	listen 80 default_server;
    	listen [::]:80 default_server;
    	server_name _;
    	return 301 https://$host$request_uri;
    }


  •  Save changes

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

...