Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. server {
  2. return 301 https://$host:443$request_uri;
  3. }
  4. server {
  5. server_name runetki.chat www.runetki.chat;
  6. ssl_certificate "/var/www/httpd-cert/runetki_chat/runetki.chat_le1.crtca";
  7. ssl_certificate_key "/var/www/httpd-cert/runetki_chat/runetki.chat_le1.key";
  8. ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
  9. ssl_prefer_server_ciphers on;
  10. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  11. add_header Strict-Transport-Security "max-age=31536000;";
  12. ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
  13. charset UTF-8;
  14. index index.php index.html;
  15. disable_symlinks if_not_owner from=$root_path;
  16. include /etc/nginx/vhosts-includes/*.conf;
  17. include /etc/nginx/vhosts-resources/runetki.chat/*.conf;
  18. access_log /var/www/httpd-logs/runetki.chat.access.log;
  19. error_log /var/www/httpd-logs/runetki.chat.error.log notice;
  20. ssi on;
  21. set $root_path /var/www/runetki_chat/data/www/runetki.chat;
  22. root $root_path;
  23. listen 185.198.164.145:443 ssl;
  24. gzip on;
  25. gzip_comp_level 5;
  26. gzip_disable "msie6";
  27. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  28. rewrite ^([^.\?]*[^/])$ $1/ permanent;
  29. location /img/models_img/i/ {
  30. proxy_pass https://runetki.sexy:443;
  31. }
  32. location / {
  33. if ($request_method ~ "^POST$"){
  34. rewrite ^/g/ /functions/search.php;
  35. }
  36. if ($http_host ~ "^www\.(.*)$"){
  37. rewrite ^(.*)$ https://$host$1 redirect;
  38. }
  39. rewrite "^/([a-z]{2})/1/" /$1/ redirect;
  40. rewrite "^/([a-z]{2})/$" /index.php?lang=$1;
  41. rewrite "^/([a-z]{2})/([0-9]+)/$" /index.php?lang=$1&page=$2;
  42. rewrite "^/([a-z]{2})/(male|female|couples|transsexual|new|spy)/([0-9]+)/$" /index.php?lang=$1&gender=$2&page=$3;
  43. rewrite "^/([a-z]{2})/(male|female|couples|transsexual|new|spy)/$" /index.php?lang=$1&gender=$2;
  44. rewrite "^/([a-z]{2})/tag/([-a-zA-Z0-9_]+)/$" /index.php?lang=$1&tag=$2;
  45. rewrite "^/([a-z]{2})/tag/([-a-zA-Z0-9_]+)/([0-9]+)/$" /index.php?lang=$1&tag=$2&page=$3;
  46. rewrite "^/([a-z]{2})/tag/([-a-zA-Z0-9_]+)/$" /index.php?lang=$1&tag=$2;
  47. rewrite "^/([a-z]{2})/tag/([-a-zA-Z0-9_]+)/([0-9]+)/$" /index.php?lang=$1&tag=$2&page=$3;
  48. rewrite "^/([0-9]+)/$" /index.php?&page=$1;
  49. if (!-e $request_filename){
  50. rewrite "^/([a-z]{2})/([-a-zA-Z0-9_]+)/([0-9]+)/$" /index.php?lang=$1&cat=$2&page=$3;
  51. }
  52. if (!-e $request_filename){
  53. rewrite ^/([-a-zA-Z0-9_]+)/([0-9]+)/$ /index.php?cat=$1&page=$2;
  54. }
  55. if (!-e $request_filename){
  56. rewrite "^/([a-z]{2})/([-a-zA-Z0-9_]+)/$" /index.php?lang=$1&cat=$2;
  57. }
  58. if (!-e $request_filename){
  59. rewrite ^/([-a-zA-Z0-9_]+)/$ /index.php?cat=$1;
  60. }
  61. rewrite "^/([a-z]{2})/cam/([-a-zA-Z0-9_]+)/$" /index.php?lang=$1&room=$2;
  62. location ~ [^/]\.ph(p\d*|tml)$ {
  63. try_files /does_not_exists @php;
  64. }
  65. location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  66. expires 15h;
  67. }
  68. }
  69. location /1/ {
  70. rewrite ^/1/$ / redirect;
  71. }
  72. location /ru/ {
  73. rewrite ^/ru/$ / redirect;
  74. }
  75. location /male/ {
  76. rewrite ^/(male|female|couples|transsexual|new|spy)/([0-9]+)/$ /index.php?gender=$1&page=$2;
  77. rewrite ^/(male|female|couples|transsexual|new|spy)/$ /index.php?gender=$1;
  78. }
  79. location /female/ {
  80. rewrite ^/(male|female|couples|transsexual|new|spy)/([0-9]+)/$ /index.php?gender=$1&page=$2;
  81. rewrite ^/(male|female|couples|transsexual|new|spy)/$ /index.php?gender=$1;
  82. }
  83. location /couples/ {
  84. rewrite ^/(male|female|couples|transsexual|new|spy)/([0-9]+)/$ /index.php?gender=$1&page=$2;
  85. rewrite ^/(male|female|couples|transsexual|new|spy)/$ /index.php?gender=$1;
  86. }
  87. location /transsexual/ {
  88. rewrite ^/(male|female|couples|transsexual|new|spy)/([0-9]+)/$ /index.php?gender=$1&page=$2;
  89. rewrite ^/(male|female|couples|transsexual|new|spy)/$ /index.php?gender=$1;
  90. }
  91. location /new/ {
  92. rewrite ^/(male|female|couples|transsexual|new|spy)/([0-9]+)/$ /index.php?gender=$1&page=$2;
  93. rewrite ^/(male|female|couples|transsexual|new|spy)/$ /index.php?gender=$1;
  94. }
  95. location /spy/ {
  96. rewrite ^/(male|female|couples|transsexual|new|spy)/([0-9]+)/$ /index.php?gender=$1&page=$2;
  97. rewrite ^/(male|female|couples|transsexual|new|spy)/$ /index.php?gender=$1;
  98. }
  99. location /tag/ {
  100. rewrite ^/tag/([-a-zA-Z0-9_]+)/$ /index.php?lang=en&tag=$1;
  101. rewrite ^/tag/([-a-zA-Z0-9_]+)/([0-9]+)/$ /index.php?tag=$1&page=$2;
  102. rewrite ^/tag/([-a-zA-Z0-9_]+)/$ /index.php?lang=en&tag=$1;
  103. rewrite ^/tag/([-a-zA-Z0-9_]+)/([0-9]+)/$ /index.php?tag=$1&page=$2;
  104. }
  105. location /cam/ {
  106. rewrite ^/cam/([-a-zA-Z0-9_]+)/$ /index.php?room=$1;
  107. }
  108. location @php {
  109. fastcgi_index index.php;
  110. fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@runetki.chat";
  111. fastcgi_pass unix:/var/www/php-fpm/runetki_chat.sock;
  112. fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
  113. try_files $uri =404;
  114. include fastcgi_params;
  115. }
  116. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement