-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,51 @@ | ||
upstream was { | ||
server server:8080; | ||
keepalive 32; | ||
} | ||
|
||
server { | ||
listen [::]:80 default_server; | ||
root /var/www/html; | ||
server_name _; | ||
listen 80 default_server; | ||
|
||
location / { | ||
resolver 8.8.8.8 ipv6=off; | ||
proxy_pass http://server:8080; | ||
proxy_pass http://was; | ||
proxy_set_header X-Real_IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $http_host; | ||
|
||
proxy_http_version 1.1; | ||
proxy_set_header Connection ""; | ||
} | ||
} | ||
|
||
server { | ||
root /var/www/html; | ||
server_name pokerogue-helper.com; | ||
listen 443 ssl; | ||
|
||
location / { | ||
resolver 8.8.8.8; | ||
proxy_pass http://server:8080; | ||
resolver 8.8.8.8 ipv6=off; | ||
proxy_pass http://was; | ||
proxy_set_header X-Real_IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header Host $http_host; | ||
|
||
proxy_http_version 1.1; | ||
proxy_set_header Connection ""; | ||
} | ||
|
||
listen [::]:443 ssl; | ||
listen 443 ssl; | ||
ssl_certificate /etc/letsencrypt/live/pokerogue-helper.com/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/pokerogue-helper.com/privkey.pem; | ||
include /etc/letsencrypt/options-ssl-nginx.conf; | ||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; | ||
} | ||
|
||
server { | ||
server_name pokerogue-helper.com; | ||
listen 80 ; | ||
|
||
if ($host = pokerogue-helper.com) { | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
listen 80 ; | ||
listen [::]:80 ; | ||
server_name pokerogue-helper.com; | ||
return 404; | ||
} |