LetsEncrypt HTTPS error (With Laravel)


My http works fine but if i try to run the site though the https i get this error (chrome)

This site can’t be reached refused to connect.

The following is my sites-available file:

server {
        listen 80;
        listen [::]:80;

        return 301 https://$server_name$request_uri;

server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;

        include snippets/;
        include snippets/ssl-params.conf;

        root /var/www/html/TheStephenB/public;

        index index.php index.html index.htm index.nginx-debian.html;


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

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

        location ~ /\.ht {
                deny all;

        location ~ /.well-known {
                allow all;


Adding the files got me this error - Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.

Just noticed that my sites-enabled folder is empty, is this an issue?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

YES, sites-enabled being empty is a problem. Linking sites-available/ to sites-enabled/ is error prone. Use this:

sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

and then check that the content you read in enabled is what you read in avail.