I have a VPS Linux (Ubuntu) server and I would like to connect a domain name with my server IP through nginx, but nginx does not work. I have checked the following:
$ sudo systemctl reload nginx
nginx.service is not active, cannot reload
$ sudo service nginx start
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
$ systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-05-15 18:53:40 CEST; 11s ago
$ sudo nginx -t
nginx: [emerg] unknown "connection_upgrade" variable
nginx: configuration file /etc/nginx/nginx.conf test failed
In relation to run an app on my own domain, I have a nginx configuration file:
$ sudo cat /etc/nginx/sites-available/shiny
server {
server_name my_domain.com;
location / {
proxy_pass http://localhost:80;
proxy_redirect / $scheme://$http_host/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 20d;
proxy_buffering off;
}
}
I would appreciate if someone could help me with this issue.
connection_upgrade
used there.