Advertisement
Guest User

default

a guest
Jul 23rd, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. ##
  2. # You should look at the following URL's in order to grasp a solid understanding
  3. # of Nginx configuration files in order to fully unleash the power of Nginx.
  4. # https://www.nginx.com/resources/wiki/start/
  5. # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  6. # https://wiki.debian.org/Nginx/DirectoryStructure
  7. #
  8. # In most cases, administrators will remove this file from sites-enabled/ and
  9. # leave it as reference inside of sites-available where it will continue to be
  10. # updated by the nginx packaging team.
  11. #
  12. # This file will automatically load configuration files provided by other
  13. # applications, such as Drupal or Wordpress. These applications will be made
  14. # available underneath a path with that package name, such as /drupal8.
  15. #
  16. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  17. ##
  18.  
  19. # Default server configuration
  20.  
  21.  
  22. #http {
  23. upstream backend {
  24. server 127.0.0.1:8181 weight=3;
  25. server 127.0.0.1:8282;
  26. server 127.0.0.1:8383;
  27. }
  28.  
  29. server {
  30. #listen 80 default_server;
  31. #listen [::]:80 default_server;
  32. #listen 80;
  33. # SSL configuration
  34. #
  35. # listen 443 ssl default_server;
  36. # listen [::]:443 ssl default_server;
  37. #
  38. # Note: You should disable gzip for SSL traffic.
  39. # See: https://bugs.debian.org/773332
  40. #
  41. # Read up on ssl_ciphers to ensure a secure configuration.
  42. # See: https://bugs.debian.org/765782
  43. #
  44. # Self signed certs generated by the ssl-cert package
  45. # Don't use them in a production server!
  46. #
  47. # include snippets/snakeoil.conf;
  48.  
  49. #root /var/www/html;
  50.  
  51. # Add index.php to the list if you are using PHP
  52. #index index.html index.htm index.nginx-debian.html;
  53.  
  54. #server_name *.testarki.fr;
  55.  
  56. location / {
  57. # First attempt to serve request as file, then
  58. # as directory, then fall back to displaying a 404.
  59. #proxy_set_header X-Real-IP $remote_addr;
  60. #proxy_set_header Host $http_host;
  61. proxy_pass http://backend;
  62. }
  63.  
  64. # pass PHP scripts to FastCGI server
  65. #
  66. #location ~ \.php$ {
  67. # include snippets/fastcgi-php.conf;
  68. #
  69. # # With php-fpm (or other unix sockets):
  70. # fastcgi_pass unix:/run/php/php7.3-fpm.sock;
  71. # # With php-cgi (or other tcp sockets):
  72. # fastcgi_pass 127.0.0.1:9000;
  73. #}
  74.  
  75. # deny access to .htaccess files, if Apache's document root
  76. # concurs with nginx's one
  77. #
  78. #location ~ /\.ht {
  79. # deny all;
  80. #}
  81. }
  82. #}
  83.  
  84.  
  85. # Virtual Host configuration for example.com
  86. #
  87. # You can move that to a different file under sites-available/ and symlink that
  88. # to sites-enabled/ to enable it.
  89. #
  90. server {
  91. listen 8181;
  92. listen [::]:8181;
  93.  
  94. server_name *.mywebsitearki.fr;
  95.  
  96. root /var/www/arki.fr;
  97. index index.html index.php;
  98.  
  99. location / {
  100. try_files $uri $uri/ =404;
  101. }
  102.  
  103. location ~ \.php$ {
  104. include snippets/fastcgi-php.conf;
  105. fastcgi_pass unix:/run/php/php7.3-fpm.sock;
  106. }
  107.  
  108. location ~ /\.ht {
  109. deny all;
  110. }
  111. }
  112.  
  113. server {
  114. listen 8282;
  115. listen [::]:8282;
  116.  
  117. server_name *.mywebsitearki.fr;
  118.  
  119. root /var/www/arki.fr;
  120. index index.php index.html;
  121.  
  122. location / {
  123. try_files $uri $uri/ =404;
  124. }
  125.  
  126. location ~ \.php$ {
  127. include snippets/fastcgi-php.conf;
  128. fastcgi_pass unix:/run/php/php7.3-fpm.sock;
  129. }
  130.  
  131. location ~ /\.ht {
  132. deny all;
  133. }
  134. }
  135. server {
  136. listen 8383;
  137. listen [::]:8383;
  138.  
  139. server_name *.mywebsitearki.fr;
  140.  
  141. root /var/www/arki.fr;
  142. index index.php index.html;
  143.  
  144. location / {
  145. try_files $uri $uri/ =404;
  146. }
  147.  
  148. location ~ \.php$ {
  149. include snippets/fastcgi-php.conf;
  150. fastcgi_pass unix:/run/php/php7.3-fpm.sock;
  151. }
  152.  
  153. location ~ /\.ht {
  154. deny all;
  155. }
  156. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement