2008-05-12 04:40:35 +00:00
|
|
|
--- conf/nginx.conf.orig 2008-05-11 21:19:44.000000000 -0600
|
|
|
|
+++ conf/nginx.conf 2008-05-11 22:20:32.000000000 -0600
|
|
|
|
@@ -1,28 +1,59 @@
|
|
|
|
+#######################################################################
|
|
|
|
+#
|
|
|
|
+# This is the main Nginx configuration file.
|
|
|
|
+#
|
|
|
|
+# More information about the configuration options is available on
|
|
|
|
+# * the English wiki - http://wiki.codemongers.com/Main
|
|
|
|
+# * the Russian documentation - http://sysoev.ru/nginx/
|
|
|
|
+#
|
|
|
|
+#######################################################################
|
|
|
|
+
|
|
|
|
+#----------------------------------------------------------------------
|
|
|
|
+# Main Module - directives that cover basic functionality
|
|
|
|
+#
|
|
|
|
+# http://wiki.codemongers.com/NginxMainModule
|
|
|
|
+#
|
|
|
|
+#----------------------------------------------------------------------
|
|
|
|
|
2007-03-24 18:31:48 +00:00
|
|
|
-#user nobody;
|
2008-05-12 04:40:35 +00:00
|
|
|
+user nginx;
|
2007-03-24 18:31:48 +00:00
|
|
|
worker_processes 1;
|
|
|
|
|
|
|
|
-#error_log logs/error.log;
|
|
|
|
-#error_log logs/error.log notice;
|
|
|
|
-#error_log logs/error.log info;
|
2008-05-12 04:40:35 +00:00
|
|
|
+error_log /var/log/nginx/error.log;
|
|
|
|
+#error_log /var/log/nginx/error.log notice;
|
|
|
|
+#error_log /var/log/nginx/error.log info;
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
-#pid logs/nginx.pid;
|
2008-05-12 04:40:35 +00:00
|
|
|
+pid /var/run/nginx.pid;
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
|
2008-05-12 04:40:35 +00:00
|
|
|
+
|
|
|
|
+#----------------------------------------------------------------------
|
|
|
|
+# Events Module
|
|
|
|
+#
|
|
|
|
+# http://wiki.codemongers.com/NginxEventsModule
|
|
|
|
+#
|
|
|
|
+#----------------------------------------------------------------------
|
|
|
|
+
|
2007-03-24 18:31:48 +00:00
|
|
|
events {
|
2008-05-12 04:40:35 +00:00
|
|
|
worker_connections 1024;
|
|
|
|
}
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
|
2008-05-12 04:40:35 +00:00
|
|
|
+#----------------------------------------------------------------------
|
|
|
|
+# HTTP Core Module
|
|
|
|
+#
|
|
|
|
+# http://wiki.codemongers.com/NginxHttpCoreModule
|
|
|
|
+#
|
|
|
|
+#----------------------------------------------------------------------
|
|
|
|
+
|
2007-03-24 18:31:48 +00:00
|
|
|
http {
|
2008-05-12 04:40:35 +00:00
|
|
|
- include mime.types;
|
2007-03-24 18:31:48 +00:00
|
|
|
+ include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
- #log_format main '$remote_addr - $remote_user [$time_local] $request '
|
|
|
|
- # '"$status" $body_bytes_sent "$http_referer" '
|
|
|
|
- # '"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
|
|
|
|
+ '"$status" $body_bytes_sent "$http_referer" '
|
|
|
|
+ '"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
|
|
|
|
- #access_log logs/access.log main;
|
|
|
|
+ access_log /var/log/nginx/access.log main;
|
|
|
|
|
|
|
|
sendfile on;
|
|
|
|
#tcp_nopush on;
|
2008-05-12 04:40:35 +00:00
|
|
|
@@ -31,27 +62,36 @@
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
|
|
|
#gzip on;
|
|
|
|
+
|
|
|
|
+ # Load config files from the /etc/nginx/conf.d directory
|
|
|
|
+ include /etc/nginx/conf.d/*.conf;
|
|
|
|
|
|
|
|
+ #
|
|
|
|
+ # The default server
|
|
|
|
+ #
|
|
|
|
server {
|
|
|
|
- listen 80;
|
|
|
|
- server_name localhost;
|
|
|
|
+ listen 80 default;
|
|
|
|
+ server_name _;
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
#charset koi8-r;
|
|
|
|
|
2008-05-12 04:40:35 +00:00
|
|
|
#access_log logs/host.access.log main;
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
location / {
|
2008-05-12 04:40:35 +00:00
|
|
|
- root html;
|
|
|
|
+ root /usr/share/nginx/html;
|
|
|
|
index index.html index.htm;
|
|
|
|
}
|
|
|
|
|
|
|
|
- #error_page 404 /404.html;
|
|
|
|
+ error_page 404 /404.html;
|
|
|
|
+ location = /404.html {
|
|
|
|
+ root /usr/share/nginx/html;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
|
|
#
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
location = /50x.html {
|
|
|
|
- root html;
|
|
|
|
+ root /usr/share/nginx/html;
|
|
|
|
}
|
|
|
|
|
|
|
|
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
|
|
|
@@ -77,42 +117,4 @@
|
|
|
|
# deny all;
|
|
|
|
#}
|
|
|
|
}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- # another virtual host using mix of IP-, name-, and port-based configuration
|
|
|
|
- #
|
|
|
|
- #server {
|
|
|
|
- # listen 8000;
|
|
|
|
- # listen somename:8080;
|
|
|
|
- # server_name somename alias another.alias;
|
|
|
|
-
|
|
|
|
- # location / {
|
|
|
|
- # root html;
|
|
|
|
- # index index.html index.htm;
|
|
|
|
- # }
|
|
|
|
- #}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- # HTTPS server
|
|
|
|
- #
|
|
|
|
- #server {
|
|
|
|
- # listen 443;
|
|
|
|
- # server_name localhost;
|
|
|
|
-
|
|
|
|
- # ssl on;
|
|
|
|
- # ssl_certificate cert.pem;
|
|
|
|
- # ssl_certificate_key cert.key;
|
|
|
|
-
|
|
|
|
- # ssl_session_timeout 5m;
|
|
|
|
-
|
|
|
|
- # ssl_protocols SSLv2 SSLv3 TLSv1;
|
|
|
|
- # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
|
|
|
|
- # ssl_prefer_server_ciphers on;
|
|
|
|
-
|
|
|
|
- # location / {
|
|
|
|
- # root html;
|
|
|
|
- # index index.html index.htm;
|
|
|
|
- # }
|
|
|
|
- #}
|
2007-03-24 18:31:48 +00:00
|
|
|
-
|
|
|
|
}
|