Unable to access nginx site on my domain
Answered
Anay-208 posted this in #help-forum
Anay-208OP
I've a azure vm, and I installed nginx. Now I've the following config:
However, The site still isn't accessible at the url, even after adding the A record pointing to my ip
server {
listen 80;
server_name anayparaswani.me;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}However, The site still isn't accessible at the url, even after adding the A record pointing to my ip
9 Replies
I'm not using ssl as of now
the server is accessible through ip, I'm using cloudflare and its DNS only
look like you have a rule on cloudflare redirecting http to https
Answer
and your server is only listening on http
@Ray look like you have a rule on cloudflare redirecting http to https
Anay-208OP
Ok, so here is my new config after adding ssl cert:
server {
listen 80;
listen 443;
server_name anayparaswani.me;
ssl_certificate /etc/ssl/anayparaswani_me_bundle.crt;
ssl_certificate_key /etc/ssl/anayparaswani_me.key;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}I now get a error This site can’t provide a secure connection. anayparaswani.me sent an invalid response.
and I've already added ssl
oh nvm now its working