Answer the question
In order to leave comments, you need to log in
When setting the front on the server, I get the following error: State: degraded, what should I do?
I understand that some 3 files cannot start or have not passed the test, or the error is in these 3 files. How to solve this problem? The task is to put the front on the server. Here are all my steps:
I do dist already on the server, before that I loaded all the modules.
Because I already have one version of the project running on a backend that is running on the server and this backend has a separate ip address and a separate port to which I can access directly from the application via localhost, I make another folder in the folder where I have the dist of another version and call it version2, in this folder I already insert the dist of my new version. Thus, the path to my new project is like this:
[email protected]:~/cryptoVer1.1/crypto/version2/dist$
sudo nano /etc/nginx/sites-available/crypto-version2.conf
server { listen 59080;
server_name localhost;
root /home/user/cryptoVer1.1/crypto/version2/dist;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
error_log /var/log/nginx/crypto-version2-error.log;
access_log /var/log/nginx/crypto-version2-access.log;
}
sudo ln -s /etc/nginx/sites-available/crypto-version2.conf /etc/nginx/sites-enabled/crypto-version2.conf
sudo systemctl restart nginx
sudo systemctl status
Answer the question
In order to leave comments, you need to log in
nginx -t
allows you to test the config and shows where there are errors.
If the status of nginx is checked, then it should be. systemctl status nginx
If this is not a typo, and you need to understand why the system as a whole has the degraded status, then you can see which units have failed: systemctl list-units --state failed
and then look at the logs.
Perhaps it has nothing to do with your actions at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question