I'm trying to display my NodeJS
application when the user type a specific domain. I already pointed the domain on the server, then I've installed Nginx
and I have created a configuration file into:
/etc/nginx/conf.d/myapp.conf
this have the following content:
server {
listen 80;
server_name myapp.it www.myapp.it;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://localhost:4568;
}
}
I restarted Nginx
and I executed this command: nginx -t
but I got:
nginx: [warn] conflicting server name "myapp.it" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.myapp.it" on 0.0.0.0:80, ignored
when I visit the domain I get 403 Forbidden, that's because Letsencrypt
cannot register a certificate for the conflict above. What I did wrong?