SSL Setup - fourslick/notes GitHub Wiki

cat mcvupdate.com.crt mcvupdate.com.ca-bundle > ssl-bundle.crt
server {
    listen 80;
    listen [::]:80;
    server_name mcvupdate.com www.mcvupdate.com;

        return 301 https://$server_name$request_uri;
}

server {
        listen 443 ssl;

        ssl_certificate /etc/ssl/mcvupdate/ssl-bundle.crt;
        ssl_certificate_key /etc/ssl/mcvupdate/mcvupdate.com.key;

        root /home/davit/public_html/mcvupdate/public;

        index index index.php index.html;

        server_name mcvupdate.com www.mcvupdate.com;

        location / {
                try_files $uri $uri/ /index.php?$query_string;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        }

        location /pma {

                alias /var/www/html/pma;
                satisfy any;
                allow all;
                index index.php;

                location ~ \.php$ {
                    try_files $uri =404;
                    fastcgi_pass unix:/run/php/php7.2-fpm.sock;
                    index index.php;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $request_filename;
                    include fastcgi_params;
                }
        }


}