Guest User

Untitled

a guest
Oct 4th, 2011
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.92 KB | None | 0 0
  1. # You may add here your
  2. # server {
  3. #   ...
  4. # }
  5. # statements for each of your virtual hosts
  6.  
  7. server {
  8.  
  9.     listen   80; ## listen for ipv4
  10.     listen   [::]:80 default ipv6only=on; ## listen for ipv6
  11.  
  12.     server_name  localhost;
  13.  
  14.     access_log  /var/log/nginx/localhost.access.log;
  15.  
  16.     location / {
  17.         root   /var/www;
  18.         index  index.html index.htm index.php;
  19.     }
  20.    
  21.    
  22.     location /doc {
  23.         root   /usr/share;
  24.         autoindex on;
  25.         allow 127.0.0.1;
  26.         deny all;
  27.     }
  28.  
  29.     location /images {
  30.         root   /usr/share;
  31.         autoindex on;
  32.     }
  33.  
  34.     #error_page  404  /404.html;
  35.  
  36.     # redirect server error pages to the static page /50x.html
  37.     #
  38.     error_page   500 502 503 504  /50x.html;
  39.     location = /50x.html {
  40.         root   /var/www/nginx-default;
  41.     }
  42.  
  43.     # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  44.     #
  45.     #location ~ \.php$ {
  46.         #proxy_pass   http://127.0.0.1;
  47.     #}
  48.  
  49.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  50.     #
  51.     location ~ \.php$ {
  52.         fastcgi_pass   127.0.0.1:9000;
  53.         fastcgi_index  index.php;
  54.         fastcgi_param  SCRIPT_FILENAME  var/www$fastcgi_script_name;
  55.         include          fastcgi_params;
  56.     }
  57.  
  58.     # deny access to .htaccess files, if Apache's document root
  59.     # concurs with nginx's one
  60.     #
  61.     location ~ /\.ht {
  62.         deny  all;
  63.     }
  64. }
  65.  
  66. # another virtual host using mix of IP-, name-, and port-based configuration
  67. #
  68. #server {
  69. #listen   80;
  70. #server_name  localhost;
  71. #rewrite ^/(.*) https://localhost/minecraft/admin/$1 permanent;
  72.  
  73.            
  74. #location / {
  75. #root   var/www;
  76. #index  index.html index.php index.htm;
  77. #}
  78. #}
  79.  
  80.  
  81. # HTTPS server
  82. #
  83. server {
  84. listen   443;
  85. server_name  localhost;
  86.  
  87. ssl  on;
  88. ssl_certificate  ssl/server.crt;
  89. ssl_certificate_key  ssl/server.key;
  90.  
  91. ssl_session_timeout  5m;
  92.  
  93. #ssl_protocols  SSLv3 TLSv1;
  94. #ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  95. #ssl_prefer_server_ciphers   on;
  96.  
  97. location / {
  98. root   /var/www/;
  99. index  index.html index.php index.htm;
  100. }
  101. }
  102.  
  103.  
Advertisement
Add Comment
Please, Sign In to add comment