Hi,
I’m running a Meteor app on a droplet, and I tried to follow this tutorial for setting up ssl and https connections: https://www.digitalocean.com/community/tutorials/how-to-install-an-ssl-certificate-from-a-commercial-certificate-authority
HTTP connections to bqscorekeeper.com still work, but for HTTPS connections, nginx returns 404 not found.
When I type “nginx -t”, this message is returned: nginx: [warn] conflicting server name “bqscorekeeper.com” on 0.0.0.0:80, ignored nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
I’m not sure what to do now. Here are two of my files from /etc/nginx/sites-enabled
bscorekeeper.com.conf:
server {
listen 80;
server_name bqscorekeeper.com www.bqscorekeeper.com *.bqscorekeeper.com 104.236.89.47;
access_log /var/log/nginx/app.dev.access.log;
error_log /var/log/nginx/app.dev.error.log;
location / {
proxy_pass http://104.236.89.47:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Fowarded-For $remote_addr;
}
}
default:
server {
listen 80;
server_name bqscorekeeper.com;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
}
server {
listen 443;
server_name bqscorekeeper.com;
root /user/share/nginx/html;
index index.html index.htm;
ssl on;
ssl_certificate /root/bqscorekeeper.com.crt;
ssl_certificate_key /root/bqscorekeeper.com.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
location / {
try_files $uri $uri/ =404;
}
}
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!
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.
You are setting the same thing twice under http (80) server_name bqscorekeeper.com;
Have a look at the configuration here to try and see why your https isn’t serving or finding the app properly. https://www.digitalocean.com/community/questions/cannot-configure-https-for-www-subdomain-using-nginx-server-blocks
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.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
