Answer the question
In order to leave comments, you need to log in
Can't restart nginx with sudo systemctl restart nginx?
Hello! I'm trying to make frontend and backend on the same domain, I set up ports and when I do updates sudo systemctl restart nginx
gives an error:
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
server {
listen 80;
server_name project.gq www.project.gq;
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;
}
}
server {
listen 80;
server_name api.project.gq www.api.project.gq;
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;
}
}
server {
listen 80;
server_name project.gq www.project.gq;
root /home/project/project-frontend/dist;
}
Answer the question
In order to leave comments, you need to log in
Error in the length of the domain, the solution in the comments is in question
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question