Advertisement
Guest User

Untitled

a guest
Mar 13th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. server {
  2. ## redirection url ##
  3. listen 80;
  4. server_name mydomaine.com www.mydomaine.com;
  5.  
  6. ## redirection permanant HTTP: vers HTTPS: ##
  7. rewrite ^ https://$server_name$request_uri? permanent;
  8.  
  9. ## inclure pages erreurs ##
  10. # include /etc/nginx/conf.d/error_pages.conf;
  11. }
  12.  
  13. server {
  14. listen 443 default_server ssl http2;
  15. server_name mydomaine.com www.mydomaine.com;
  16.  
  17. index index.html index.php;
  18. charset utf-8;
  19. client_max_body_size 10M;
  20.  
  21. ## Début ##
  22.  
  23. ssl on;
  24. ssl_certificate /etc/ssl/nginx/mydomaine.com.crt-unified;
  25. ssl_certificate_key /etc/ssl/nginx/server.key;
  26. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  27. ssl_ciphers "EECDH+AESGCM:AES128+EECDH:AES256+EECDH";
  28.  
  29. ssl_prefer_server_ciphers on;
  30. ssl_ecdh_curve secp384r1;
  31.  
  32. ssl_session_cache shared:SSL:10m;
  33. ssl_session_timeout 10m;
  34.  
  35. ssl_stapling on;
  36. ssl_stapling_verify on;
  37.  
  38. resolver 8.8.4.4 8.8.8.8 valid=300s;
  39. resolver_timeout 10s;
  40.  
  41. add_header X-Frame-Options "SAMEORIGIN";
  42. add_header X-Content-Type-Options "nosniff";
  43.  
  44. ## Fin ##
  45.  
  46. ## inclure pages erreurs ##
  47. include /etc/nginx/conf.d/error_pages.conf;
  48.  
  49. # On a neutralisés les lignes SSL et l'include ci-dessous car ajourt script ci-dessus
  50.  
  51. ## ssl_certificate /etc/nginx/ssl/server.crt; ##
  52. ## ssl_certificate_key /etc/nginx/ssl/server.key; ##
  53.  
  54. # include /etc/nginx/conf.d/ciphers.conf; ##
  55.  
  56. access_log /var/log/nginx/rutorrent-access.log combined;
  57. error_log /var/log/nginx/rutorrent-error.log error;
  58.  
  59. # error_page 500 502 503 504 /50x.html;
  60. # location = /50x.html { root /usr/share/nginx/html; }
  61.  
  62. # auth_basic "seedbox";
  63. auth_basic "mydomaine";
  64. auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
  65.  
  66. location = /favicon.ico {
  67. access_log off;
  68. log_not_found off;
  69. }
  70.  
  71. ## début config accueil serveur ##
  72.  
  73. location ^~ / {
  74. root /var/www/base;
  75. include /etc/nginx/conf.d/php.conf;
  76. include /etc/nginx/conf.d/cache.conf;
  77. satisfy any;
  78. allow all;
  79. }
  80.  
  81. ## fin config accueil serveur ##
  82.  
  83. ## début config proxy ##
  84.  
  85. location ^~ /proxy {
  86. root /var/www;
  87. include /etc/nginx/conf.d/php.conf;
  88. include /etc/nginx/conf.d/cache.conf;
  89. }
  90.  
  91. ## fin config proxy ##
  92.  
  93. ## début config rutorrent ##
  94.  
  95. location ^~ /rutorrent {
  96. root /var/www;
  97. include /etc/nginx/conf.d/php.conf;
  98. include /etc/nginx/conf.d/cache.conf;
  99.  
  100. location ~ /\.svn {
  101. deny all;
  102. }
  103.  
  104. location ~ /\.ht {
  105. deny all;
  106. }
  107. }
  108.  
  109. location ^~ /rutorrent/conf/ {
  110. deny all;
  111. }
  112.  
  113. location ^~ /rutorrent/share/ {
  114. deny all;
  115. }
  116.  
  117. ## fin config rutorrent ##
  118.  
  119. ## début config munin ##
  120.  
  121. location ^~ /graph {
  122. root /var/www;
  123. include /etc/nginx/conf.d/php.conf;
  124. include /etc/nginx/conf.d/cache.conf;
  125. }
  126.  
  127. location ^~ /graph/img {
  128. root /var/www;
  129. include /etc/nginx/conf.d/php.conf;
  130. include /etc/nginx/conf.d/cache.conf;
  131. error_log /dev/null crit;
  132. }
  133.  
  134. location ^~ /monitoring {
  135. root /var/www;
  136. include /etc/nginx/conf.d/php.conf;
  137. include /etc/nginx/conf.d/cache.conf;
  138. }
  139.  
  140. ## fin config munin ##
  141.  
  142. ## début config seedbox-manager ##
  143.  
  144. location ^~ /seedbox-manager {
  145. alias /var/www/seedbox-manager/public;
  146. include /etc/nginx/conf.d/php-manager.conf;
  147. include /etc/nginx/conf.d/cache.conf;
  148. }
  149.  
  150. ## fin config seedbox-manager ##
  151.  
  152. ## config utilisateurs ##
  153.  
  154. location /USER1 {
  155. include scgi_params;
  156. scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session/username.socket
  157. # auth_basic "seedbox";
  158. auth_basic "mydomaine";
  159. auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_user1";
  160. }
  161.  
  162. location /USER2 {
  163. include scgi_params;
  164. scgi_pass 127.0.0.1:5003; #ou socket : unix:/home/username/.session/username.socket
  165. # auth_basic "seedbox";
  166. auth_basic "mydomaine";
  167. auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_user2";
  168. }
  169. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement