minecraft-monitor/nginx.conf

35 lines
No EOL
935 B
Nginx Configuration File

server {
listen 80;
server_name "your domain name";
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name "your domain name";
# ssl related config
root /var/www/mc_status/dist;
index index.html;
location = /api {
proxy_pass http://127.0.0.1:10010;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# add_header Access-Control-Allow-Origin *;
}
location /api/ {
proxy_pass http://127.0.0.1:10010/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# add_header Access-Control-Allow-Origin *;
}
}