Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. # You may add here your
  2. # server {
  3. # ...
  4. # }
  5. # statements for each of your virtual hosts to this file
  6.  
  7. ##
  8. # You should look at the following URL's in order to grasp a solid understanding
  9. # of Nginx configuration files in order to fully unleash the power of Nginx.
  10. # http://wiki.nginx.org/Pitfalls
  11. # http://wiki.nginx.org/QuickStart
  12. # http://wiki.nginx.org/Configuration
  13. #
  14. # Generally, you will want to move this file somewhere, and start with a clean
  15. # file but keep this around for reference. Or just disable in sites-enabled.
  16. #
  17. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  18. ##
  19. server {
  20.  
  21. listen 80;
  22. listen [::]:80 default_server ipv6only=on;
  23.  
  24. server_name 76chan.org;
  25. rewrite ^ https://$server_name$request_uri? permanent;
  26. }
  27.  
  28. server {
  29. listen 443; ## listen for ipv4; this line is default and implied
  30. listen [::]:443 default_server ipv6only=on; ## listen for ipv6
  31.  
  32. ssl on;
  33. ssl_certificate /etc/nginx/ssl/ssl-unified.crt;
  34. ssl_certificate_key /etc/nginx/ssl/ssl.key;
  35.  
  36. root /var/www;
  37. index index.php index.html index.htm /_h5ai/server/php/index.php;
  38.  
  39. # Make site accessible from http://localhost/
  40. server_name 76chan.org;
  41.  
  42. autoindex on;
  43.  
  44.  
  45. location ~ ^(.*?\.php)($|/.*)? {
  46. try_files $1 =404;
  47. fastcgi_pass unix:/var/run/php5-fpm.sock;
  48. fastcgi_param PATH_INFO $2 if_not_empty;
  49. fastcgi_index index.php;
  50. include fastcgi_params;
  51. }
  52. location /doc/ {
  53. alias /usr/share/doc/;
  54. autoindex on;
  55. allow 127.0.0.1;
  56. allow ::1;
  57. deny all;
  58. }
  59.  
  60. location ^~ /m/ {
  61. auth_basic "Fuck off if you're not a mod.";
  62. auth_basic_user_file /home//apasswords/.htpasswd;
  63. }
  64. # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
  65. #location /RequestDenied {
  66. # proxy_pass http://127.0.0.1:8080;
  67. #}
  68.  
  69. error_page 404 /404.html;
  70.  
  71. # deny access to .htaccess files, if Apache's document root
  72. # concurs with nginx's one
  73. #
  74. location ~ /\.ht {
  75. deny all;
  76. }
  77. }
  78.  
  79. server {
  80. listen 80;
  81. server_name irc.76chan.org;
  82. root /var/www/irc;
  83. index index.html index.htm;
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement