Advertisement
Natsue

nginx.conf 02/03/2020 [INSTALLER]

Jan 4th, 2020 (edited)
2,459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Hanayo frontend
  2. server {
  3.     listen 80;
  4.     listen [::]:80;
  5.     server_name osu.ppy.sh www.osu.ppy.sh;
  6.     return 301 https://$server_name$request_uri;
  7. }
  8.  
  9. server {
  10.     listen 443 ssl;
  11.     server_name osu.ppy.sh www.osu.ppy.sh;
  12.  
  13.     #ssl on;
  14.     ssl_certificate DIRECTORY/nginx/cert.pem;
  15.     ssl_certificate_key DIRECTORY/nginx/key.pem;
  16.     ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  17.     ssl_prefer_server_ciphers on;
  18.  
  19.     # Redirect to same site but not osu.ppy.sh
  20.     location / {
  21.         return 302 https://DOMAIN$request_uri;
  22.     }
  23.  
  24.     #rippleapi
  25.     location /api {
  26.         proxy_set_header X-Real-IP $remote_addr;
  27.         proxy_set_header X-Forwarded_for $proxy_add_x_forwarded_for;
  28.         proxy_set_header X-Forwarded-Proto https;
  29.         proxy_redirect off;
  30.         proxy_pass http://127.0.0.1:40001;
  31.     }
  32.  
  33.     #lets
  34.     location ~ ^/(web|ss|d)/ {
  35.         proxy_set_header X-Real-IP $remote_addr;
  36.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  37.         proxy_set_header X-Forwarded-Proto https;
  38.         proxy_set_header Host $http_host;
  39.         proxy_redirect off;
  40.         proxy_pass http://127.0.0.1:5002;
  41.     }
  42.  
  43. }
  44.  
  45. # Avatar server
  46. server {
  47.     listen 80;
  48.     listen [::]:80;
  49.     server_name a.ppy.sh;
  50.     return 301 https://$server_name$request_uri;
  51. }
  52.  
  53. server {
  54.     listen 443 ssl;
  55.     server_name a.ppy.sh;
  56.  
  57.     ssl_certificate DIRECTORY/nginx/cert.pem;
  58.     ssl_certificate_key DIRECTORY/nginx/key.pem;
  59.     ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  60.     ssl_prefer_server_ciphers on;
  61.  
  62.     location / {
  63.         proxy_set_header X-Real-IP $remote_addr;
  64.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  65.         proxy_set_header X-Forwarded-Proto https;
  66.         proxy_set_header Host $http_host;
  67.         proxy_redirect off;
  68.         proxy_pass http://127.0.0.1:5000;    # default port is 5000
  69.     }
  70. }
  71.  
  72. server {
  73.     listen 80;
  74.     listen 443 ssl;
  75.     server_name i.ppy.sh;
  76.  
  77.     ssl_certificate DIRECTORY/nginx/cert.pem;
  78.     ssl_certificate_key DIRECTORY/nginx/key.pem;
  79.     ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  80.     ssl_prefer_server_ciphers on;
  81.    
  82.     root /var/www/osu.ppy.sh/main_menu_icons;
  83.     index index.html;
  84.     location / {
  85.         try_files $uri =404;
  86.     }
  87. }
  88.  
  89. # Servers
  90. server {
  91.     listen 80;
  92.     listen [::]:80;
  93.     server_name PRE-SETUP-SERVER-BY-AOBA-OSU-AINU.ppy.sh;
  94.     return 301 https://$server_name$request_uri;
  95. }
  96.  
  97. server {
  98.     listen 443 ssl;
  99.     server_name PRE-SETUP-SERVER-BY-AOBA-OSU-AINU.ppy.sh;
  100.  
  101.     ssl_certificate DIRECTORY/nginx/cert.pem;
  102.     ssl_certificate_key DIRECTORY/nginx/key.pem;
  103.     ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  104.     ssl_prefer_server_ciphers on;
  105.  
  106.     location / {
  107.         proxy_set_header X-Real-IP $remote_addr;
  108.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  109.         proxy_set_header X-Forwarded-Proto https;
  110.         proxy_set_header Host $http_host;
  111.         proxy_redirect off;
  112.         proxy_pass http://127.0.0.1:5001;    # default port is 5000
  113.     }
  114. }
  115.  
  116. # Bancho server
  117. server {
  118.     listen 443 ssl;
  119.     listen 80;
  120.     server_name c.ppy.sh c1.ppy.sh c2.ppy.sh c3.ppy.sh c4.ppy.sh c5.ppy.sh c6.ppy.sh c7.ppy.sh c8.ppy.sh c9.ppy.sh ce.ppy.sh;
  121.  
  122.     ssl_certificate DIRECTORY/nginx/cert.pem;
  123.     ssl_certificate_key DIRECTORY/nginx/key.pem;
  124.     ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  125.     ssl_prefer_server_ciphers on;
  126.  
  127.     location / {
  128.         proxy_set_header X-Real-IP $remote_addr;
  129.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  130.         proxy_set_header X-Forwarded-Proto https;
  131.         proxy_set_header Host $http_host;
  132.         proxy_redirect off;
  133.         proxy_pass http://127.0.0.1:5001;
  134.     }
  135. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement