nginx 配置文件和重启服务命令

This commit is contained in:
2023-01-30 09:14:24 +08:00
parent 1c52460497
commit 71e3081668
4 changed files with 140 additions and 0 deletions

22
nginx/conf.d/default.conf Normal file
View File

@ -0,0 +1,22 @@
server {
listen 80;
listen [::]:80;
listen 443 ssl;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ =404;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET,POST,PUT,DELETE';
add_header 'Access-Control-Allow-Header' 'Content-Type,*';
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}