I'm currently serving the server using nginx with the following configuration.
server {
server_name www.skipven.xyz skipven.xyz;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/ubuntu/ari-bot/aribot;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/ubuntu/ari-bot/ari-bot.sock;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/skipven.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/skipven.xyz/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = www.skipven.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = skipven.xyz) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name www.skipven.xyz skipven.xyz;
return 404; # managed by Certbot
}
When I try to access http://skipven.xyz, It's successfully redirected to https://skipven.xyz . But https://skipven.xyz doesn't return anything. I also can't find any access log of the https request but http request is logged like charm.
Other things to note:
Running sudo nginx -t return the following response:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Running sudo ufw status return the following response:
Status: active
To Action From
-- ------ ----
Nginx Full ALLOW Anywhere
22/tcp ALLOW Anywhere
Nginx Full (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
First make sure that your web application is running, try to curl to unix socket. If it still does not work, which cloud service do you use right now? If you use aws or gce, you still need to configure their firewall.