By SMB
Hi,
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 MySite.co.uk refused to connect.
The following is my sites-available file:
server {
listen 80;
listen [::]:80;
server_name MySite.co.uk www.MySite.co.uk;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
include snippets/ssl-MySite.co.uk.conf;
include snippets/ssl-params.conf;
root /var/www/html/TheStephenB/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name MySite.co.uk www.MySite.co.uk;
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;
}
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
YES, sites-enabled being empty is a problem. Linking sites-available/ex.com to sites-enabled/ex.com is error prone. Use this:
sudo ln -s /etc/nginx/sites-available/yourname.com /etc/nginx/sites-enabled/
and then check that the content you read in enabled is what you read in avail.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.