itzikbenh
By:
itzikbenh

Website is down after trying to redirect HTTP to HTTPS

December 12, 2015 769 views
Nginx LEMP Ubuntu

I just installed an SSL and it didn't redirect the http to https so I tried to configure stuff on my nginx which broke my website. I have no idea what is wrong. I have an ubuntu server. Here is my nginx configuration:

server {
listen 80;

server_name www.dailymeal.co dailymeal.co;
return 301 https://dailymeal.co$request_uri;

}

server {
listen 443 ssl;

root /home/forge/default/public;

# FORGE SSL (DO NOT REMOVE!)
ssl_certificate /etc/nginx/ssl/dailymeal.co/18900/server.crt;
ssl_certificate_key /etc/nginx/ssl/dailymeal.co/18900/server.key;

server_name www.dailymeal.co;
return 301 https://dailymeal.co$request_uri;
1 comment
  • Never mind. I restored my droplet. I guess I will have to protect my site without an SSL. At least until the world would get rid of linux and give us something friendly.

Be the first one to answer this question.