SHARE
TWEET

Untitled

a guest Oct 2nd, 2013 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         location /doc {
  22.                 root   /usr/share;
  23.                 autoindex on;
  24.                 allow 127.0.0.1;
  25.                 deny all;
  26.         }
  27.  
  28.         location /images {
  29.                 root   /usr/share;
  30.                 autoindex on;
  31.         }
  32.  
  33.         #error_page  404  /404.html;
  34.  
  35.         # redirect server error pages to the static page /50x.html
  36.         #
  37.         #error_page   500 502 503 504  /50x.html;
  38.         #location = /50x.html {
  39.         #       root   /var/www/nginx-default;
  40.         #}
  41.  
  42.         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  43.         #
  44.         #location ~ \.php$ {
  45.                 #proxy_pass   http://127.0.0.1;
  46.         #}
  47.  
  48.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  49.         #
  50.         #location ~ \.php$ {
  51.                 #fastcgi_pass   127.0.0.1:9000;
  52.                 #fastcgi_index  index.php;
  53.                 #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
  54.                 #includefastcgi_params;
  55.         #}
  56.  
  57.         # deny access to .htaccess files, if Apache's document root
  58.         # concurs with nginx's one
  59.         #
  60.         #location ~ /\.ht {
  61.                 #deny  all;
  62.         #}
  63. }
  64.  
  65.  
  66. # another virtual host using mix of IP-, name-, and port-based configuration
  67. #
  68. #server {
  69. #listen   8000;
  70. #listen   somename:8080;
  71. #server_name  somename  alias  another.alias;
  72.  
  73. #location / {
  74. #root   html;
  75. #index  index.html index.htm;
  76. #}
  77. #}
  78.  
  79.  
  80. # HTTPS server
  81. #
  82. #server {
  83. #listen   443;
  84. #server_name  localhost;
  85.  
  86. #ssl  on;
  87. #ssl_certificate  cert.pem;
  88. #ssl_certificate_key  cert.key;
  89.  
  90. #ssl_session_timeout  5m;
  91.  
  92. #ssl_protocols  SSLv3 TLSv1;
  93. #ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  94. #ssl_prefer_server_ciphers   on;
  95.  
  96. #location / {
  97. #root   html;
  98. #index  index.html index.htm;
  99. #}
  100. #}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top