Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. ➜ nginx cat /etc/nginx/sites-available/default
  2. ##
  3. # You should look at the following URL's in order to grasp a solid understanding
  4. # of Nginx configuration files in order to fully unleash the power of Nginx.
  5. # http://wiki.nginx.org/Pitfalls
  6. # http://wiki.nginx.org/QuickStart
  7. # http://wiki.nginx.org/Configuration
  8. #
  9. # Generally, you will want to move this file somewhere, and start with a clean
  10. # file but keep this around for reference. Or just disable in sites-enabled.
  11. #
  12. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  13. ##
  14.  
  15. # Default server configuration
  16. #
  17. server {
  18. listen 80 default_server;
  19. listen [::]:80 default_server;
  20. server_name m68476521.com www.68476521.com;
  21. return 301 https://$server_name$request_uri;
  22. }
  23.  
  24. server {
  25.  
  26. # SSL configuration
  27.  
  28. listen 443 ssl http2 default_server;
  29. listen [::]:443 ssl http2 default_server;
  30. include snippets/ssl-m68476521.com.conf;
  31. include snippets/ssl-params.conf;
  32.  
  33.  
  34. # SSL configuration
  35. #
  36. # listen 443 ssl default_server;
  37. # listen [::]:443 ssl default_server;
  38. #
  39. # Note: You should disable gzip for SSL traffic.
  40. # See: https://bugs.debian.org/773332
  41. #
  42. # Read up on ssl_ciphers to ensure a secure configuration.
  43. # See: https://bugs.debian.org/765782
  44. #
  45. # Self signed certs generated by the ssl-cert package
  46. # Don't use them in a production server!
  47. #
  48. # include snippets/snakeoil.conf;
  49.  
  50. root /var/www/html;
  51.  
  52. # Add index.php to the list if you are using PHP
  53. index index.html index.htm index.nginx-debian.html;
  54.  
  55. server_name _;
  56.  
  57. location / {
  58. # First attempt to serve request as file, then
  59. # as directory, then fall back to displaying a 404.
  60. try_files $uri $uri/ =404;
  61. }
  62.  
  63. #This next line is to load CCS for styles
  64.  
  65. location = /main.ccs {
  66. root /usr/share/ngnix/html;
  67. }
  68. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  69. #
  70. #location ~ \.php$ {
  71. # include snippets/fastcgi-php.conf;
  72. #
  73. # # With php7.0-cgi alone:
  74. # fastcgi_pass 127.0.0.1:9000;
  75. # # With php7.0-fpm:
  76. # fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  77. #}
  78.  
  79. # deny access to .htaccess files, if Apache's document root
  80. # concurs with nginx's one
  81. #
  82. #location ~ /\.ht {
  83. # deny all;
  84. #}
  85. error_page 404 /custom_404.html;
  86. location = /custom_404.html {
  87. root /usr/share/nginx/html;
  88. internal;
  89. }
  90.  
  91. error_page 500 502 503 504 /custom_50x.html;
  92. location = /custom_50x.html {
  93. root /usr/share/nginx/html;
  94. internal;
  95. }
  96.  
  97. location /testing {
  98. fastcgi_pass unix:/does/not/exist;
  99. }
  100.  
  101. location ~ /.well-known {
  102. allow all;
  103. }
  104. }
  105.  
  106.  
  107. # Virtual Host configuration for example.com
  108. #
  109. # You can move that to a different file under sites-available/ and symlink that
  110. # to sites-enabled/ to enable it.
  111. #
  112. #server {
  113. # listen 80;
  114. # listen [::]:80;
  115. #
  116. # server_name example.com;
  117. #
  118. # root /var/www/example.com;
  119. # index index.html;
  120. #
  121. # location / {
  122. # try_files $uri $uri/ =404;
  123. # }
  124. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement