Test Nginx configuration
xxxxxxxxxx
nginx -t
service nginx configtest
systemctl config nginx
Example response:
nginx: the configuration file /etc/nginx-sp/nginx.conf syntax is ok
nginx: configuration file /etc/nginx-sp/nginx.conf test is successful
xxxxxxxxxx
# vi /etc/nginx/sites-enabled/default [On Debian/Ubuntu]
# vi /etc/nginx/nginx.conf [On CentOS/RHEL]
xxxxxxxxxx
user nginx;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
server {
listen 80;
root /frontend/build;
index index.html;
location / {
try_files $uri /index.html;
}
}
}