Advertisement
MeIiodas

Untitled

May 12th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.14 KB | None | 0 0
  1. # Hanayo frontend
  2. server {
  3. listen 80;
  4. listen [::]:80;
  5. server_name osu.ppy.sh www.osu.ppy.sh localhost;
  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 localhost;
  12.  
  13. #ssl on;
  14. ssl_certificate /root/ripple/nginx/cert.pem;
  15. ssl_certificate_key /root/ripple/nginx/key.pem;
  16. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  17. ssl_prefer_server_ciphers on;
  18.  
  19. location /d/ {
  20. proxy_set_header X-Real-IP $remote_addr;
  21. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22. proxy_set_header X-Forwarded-Proto https;
  23. proxy_set_header Host cg.mxr.lol;
  24. proxy_redirect off;
  25. proxy_pass http://cg.mxr.lol/d/;
  26. }
  27.  
  28. location / {
  29. proxy_set_header X-Real-IP $remote_addr;
  30. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  31. proxy_set_header X-Forwarded-Proto https;
  32. proxy_set_header Host $http_host;
  33. proxy_redirect off;
  34. proxy_pass http://127.0.0.1:6969;
  35. }
  36.  
  37. #rippleapi
  38. location /api {
  39. proxy_set_header X-Real-IP $remote_addr;
  40. proxy_set_header X-Forwarded_for $proxy_add_x_forwarded_for;
  41. proxy_set_header X-Forwarded-Proto https;
  42. proxy_redirect off;
  43. proxy_pass http://127.0.0.1:40001;
  44. }
  45.  
  46. #lets
  47. location ~ ^/(web|ss)/ {
  48. proxy_set_header X-Real-IP $remote_addr;
  49. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  50. proxy_set_header X-Forwarded-Proto https;
  51. proxy_set_header Host $http_host;
  52. proxy_redirect off;
  53. proxy_pass http://127.0.0.1:5002;
  54. }
  55.  
  56. }
  57.  
  58. # Avatar server
  59. server {
  60. listen 80;
  61. listen [::]:80;
  62. server_name a.ppy.sh a.localhost;
  63. return 301 https://$server_name$request_uri;
  64. }
  65.  
  66. server {
  67. listen 443 ssl;
  68. server_name a.ppy.sh a.localhost;
  69.  
  70. ssl_certificate /root/ripple/nginx/cert.pem;
  71. ssl_certificate_key /root/ripple/nginx/key.pem;
  72. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  73. ssl_prefer_server_ciphers on;
  74.  
  75. location / {
  76. proxy_set_header X-Real-IP $remote_addr;
  77. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  78. proxy_set_header X-Forwarded-Proto https;
  79. proxy_set_header Host $http_host;
  80. proxy_redirect off;
  81. proxy_pass http://127.0.0.1:5000; # default port is 5000
  82. }
  83. }
  84.  
  85. server {
  86. listen 80;
  87. listen 443 ssl;
  88. server_name i.ppy.sh i.localhost;
  89.  
  90. ssl_certificate /root/ripple/nginx/cert.pem;
  91. ssl_certificate_key /root/ripple/nginx/key.pem;
  92. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  93. ssl_prefer_server_ciphers on;
  94.  
  95. root /var/www/osu.ppy.sh/main_menu_icons;
  96. index index.html;
  97. location / {
  98. try_files $uri =404;
  99. }
  100. }
  101.  
  102. # Old frontend
  103. server {
  104. listen 80;
  105. listen [::]:80;
  106. server_name old.ppy.sh old.localhost;
  107. return 301 https://$server_name$request_uri;
  108. }
  109.  
  110. server {
  111. listen 443 ssl;
  112. listen [::]:443 ssl;
  113. server_name old.ppy.sh old.localhost;
  114.  
  115. root /var/www/osu.ppy.sh;
  116. index index.php index.html;
  117.  
  118. #Certificate pathes
  119. ssl_certificate /root/ripple/nginx/cert.pem;
  120. ssl_certificate_key /root/ripple/nginx/key.pem;
  121.  
  122. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  123. ssl_protocols TLSv1.2;
  124. ssl_prefer_server_ciphers on;
  125.  
  126. #Headers
  127. add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload;" always;
  128. add_header X-Content-Type-Options nosniff;
  129. add_header X-Frame-Options "SAMEORIGIN";
  130. add_header X-Robots-Tag none;
  131.  
  132. location ~ \.php$ {
  133. try_files $uri =404;
  134. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  135. fastcgi_index index.php;
  136. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  137. include /etc/nginx/fastcgi_params;
  138. }
  139.  
  140. #lets
  141. location ~ ^/(web|ss|s|b|letsapi)/ {
  142. proxy_set_header X-Real-IP $remote_addr;
  143. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  144. proxy_set_header X-Forwarded-Proto https;
  145. proxy_set_header Host $http_host;
  146. proxy_redirect off;
  147. proxy_pass http://127.0.0.1:5002;
  148. }
  149.  
  150. location / {
  151. #autoindex on;
  152. index index.php;
  153. rewrite ^/(u|d)/[0-9]+$ /rewrite.php;
  154. }
  155. }
  156.  
  157. # Bancho server
  158. server {
  159. listen 443 ssl;
  160. listen 80;
  161. 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 c.localhost;
  162.  
  163. ssl_certificate /root/ripple/nginx/cert.pem;
  164. ssl_certificate_key /root/ripple/nginx/key.pem;
  165. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  166. ssl_prefer_server_ciphers on;
  167.  
  168. location / {
  169. proxy_set_header X-Real-IP $remote_addr;
  170. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  171. proxy_set_header X-Forwarded-Proto https;
  172. proxy_set_header Host $http_host;
  173. proxy_redirect off;
  174. proxy_pass http://127.0.0.1:5001;
  175. }
  176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement