diff --git a/scripts-and-tools/example-nginx-lighthouse.conf b/scripts-and-tools/example-nginx-lighthouse.conf index ee7188c8..368556bb 100644 --- a/scripts-and-tools/example-nginx-lighthouse.conf +++ b/scripts-and-tools/example-nginx-lighthouse.conf @@ -1,10 +1,21 @@ +# Normal server server { server_name example.com resa.example.com resb.example.com resc.example.com resd.example.com rese.example.com resf.example.com res1.example.com res2.example.com res3.example.com res4.example.com res5.example.com res6.example.com res7.example.com res8.example.com res9.example.com res0.example.com; + + # SSL Configuration + listen 443 ssl; ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers ALL; ssl_prefer_server_ciphers off; + # Server locations + # Technically, the ports dont follow standards, + # but they're bad standards so who cares. + # + # /: Website server (10060) + # /LITTLEBIGPLANETPS3_XML/: Gameserver (10061) + # /api/: API server (10062) location / { proxy_http_version 1.1; proxy_pass http://127.0.0.1:10060; @@ -23,6 +34,22 @@ server { } keepalive_timeout 0; - - listen 80; } + +# HTTPS redirection +server { + # Same server_name as above + server_name example.com resa.example.com resb.example.com resc.example.com resd.example.com rese.example.com resf.example.com res1.example.com res2.example.com res3.example.com res4.example.com res5.example.com res6.example.com res7.example.com res8.example.com res9.example.com res0.example.com; + listen 80; + + location / { + return 301 https://example.com$request_uri; + } + + # Pass through traffic to Gameserver as normal. Important for LBP1/2/PSP!!!! + location /LITTLEBIGPLANETPS3_XML/ { + proxy_http_version 1.1; + proxy_pass http://127.0.0.1:10061; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } +} \ No newline at end of file