L
L
lompas232018-09-12 00:00:35
Nginx
lompas23, 2018-09-12 00:00:35

How to correctly configure ssl on port 2020?

How to correctly configure ssl on port 2020?
here is my config

server {

listen 80;

server_name radio-cash.com;

root /var/www/radio-cash.com/public;



index index.html index.htm index.php;



charset utf-8;



location / {

try_files $uri $uri/ /index.php?$query_string;

}



location = /favicon.ico { access_log off; log_not_found off; }

location = /robots.txt  { access_log off; log_not_found off; }



access_log off;

error_log  /var/log/nginx/radio-cash.com-error.log error;



error_page 404 /index.php;



sendfile off;



location ~ \.php$ {

fastcgi_split_path_info ^(.+\.php)(/.+)$;

fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;

fastcgi_index index.php;

include fastcgi_params;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

}

location ~ /\.ht {

deny all;

}







    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/radio-cash.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/radio-cash.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}


# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#	listen 80;
#	listen [::]:80;
#
#	server_name example.com;
#
#	root /var/www/example.com;
#	index index.html;
#
#	location / {
#		try_files $uri $uri/ =404;
#	}
#}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question