Working on server
This commit is contained in:
1 parent
423d8b8f52
commit
8c4eeb9793
7 files changed
+290
-80
No files matched your search
@@ -0,0 +1,47 @@
|
||||
# Install to /etc/nginx/sites-available/api.shadowoverbishkek.com and symlink
|
||||
# into sites-enabled. Then: sudo certbot --nginx -d api.shadowoverbishkek.com
|
||||
server {
|
||||
server_name api.shadowoverbishkek.com;
|
||||
|
||||
access_log /var/log/nginx/api.shadowoverbishkek.com-access.log;
|
||||
error_log /var/log/nginx/api.shadowoverbishkek.com-error.log;
|
||||
|
||||
# wss://api.shadowoverbishkek.com/server001/ -> 127.0.0.1:8081
|
||||
location /server001/ {
|
||||
proxy_pass http://127.0.0.1:8081/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $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;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 404;
|
||||
}
|
||||
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/api.shadowoverbishkek.com/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/api.shadowoverbishkek.com/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = api.shadowoverbishkek.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
server_name api.shadowoverbishkek.com;
|
||||
|
||||
listen 80;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Shadow Over Bishkek GameServer (server001)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ubuntu
|
||||
ExecStart=/home/ubuntu/shadowoverbishkek-work/shadow-over-bishkek001/server/scripts/run-server.sh
|
||||
Environment=PORT=8081
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
MemoryMax=512M
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user