|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
小知识:CentOS是企业Linux发行版领头羊RedHatEnterpriseLinux(以下称之为RHEL)的源代码再编译版本。
我的临盆情况下的nginx.conf设置装备摆设文件,做了虚拟主机设置的,人人可以依据需求更改,下载便可在本身的机械上应用了,本设置装备摆设文件摘录自《构建高可用Linux办事器》(机械工业出书社),转载费事注明出处,感谢,设置装备摆设文件以下:
- userwwwwww;worker_processes8;error_log/data/logs/nginx_error.logcrit;pid/usr/local/webserver/nginx/nginx.pid;#Specifiesthevalueformaximumfiledescriptorsthatcanbeopenedbythisprocess.worker_rlimit_nofile65535;events{useepoll;worker_connections65535;}http{includemime.types;default_typeapplication/octet-stream;#charsetgb2312;server_names_hash_bucket_size128;client_header_buffer_size32k;large_client_header_buffers432k;client_max_body_size8m;sendfileon;tcp_nopushon;keepalive_timeout60;tcp_nodelayon;fastcgi_connect_timeout300;fastcgi_send_timeout300;fastcgi_read_timeout300;fastcgi_buffer_size64k;fastcgi_buffers464k;fastcgi_busy_buffers_size128k;fastcgi_temp_file_write_size128k;gzipon;gzip_min_length1k;gzip_buffers416k;gzip_http_version1.0;gzip_comp_level2;gzip_typestext/plainapplication/x-javascripttext/CSSapplication/xml;gzip_varyon;#limit_zonecrawler$binary_remote_addr10m;server{listen80default;server_name_;indexindex.htmlindex.htmindex.php;root/data/htdocs/www;#server_name_in_redirectoff;location~.*.(php|php5)?${#fastcgi_passunix:/tmp/php-cgi.sock;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;includefcgi.conf;}location~.*.(gif|jpg|jpeg|png|bmp|swf)${expires30d;}location~.*.(js|css)?${expires1h;}}server{listen80;server_namewww.adongstudio.com;indexindex.htmlindex.htmindex.php;root/data/htdocs/www/adongweb;#limit_conncrawler20;location~.*.(php|php5)?${#fastcgi_passunix:/tmp/php-cgi.sock;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;includefcgi.conf;}location~.*.(gif|jpg|jpeg|png|bmp|swf)${expires30d;}location~.*.(js|css)?${expires1h;}log_formataccess$remote_addr-$remote_user[$time_local]"$request"$status$body_bytes_sent"$http_referer""$http_user_agent"$http_x_forwarded_for;access_log/data/logs/access.logaccess;}server{listen80;server_namewww.longfeistudio.com;indexindex.htmlindex.htmindex.php;root/data/htdocs/www/ImageVue;#limit_conncrawler20;location~.*.(php|php5)?${#fastcgi_passunix:/tmp/php-cgi.sock;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;includefcgi.conf;}location~.*.(gif|jpg|jpeg|png|bmp|swf)${expires30d;}location~.*.(js|css)?${expires1h;}access_logoff;}server{listen80;server_namewww.hongyanbike.com;indexindex.htmlindex.htmindex.php;root/data/htdocs/www/xhui/hybike;location~.*.(php|php5)?${#fastcgi_passunix:/tmp/php-cgi.sock;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;includefcgi.conf;}location~.*.(gif|jpg|jpeg|png|bmp|swf)${expires30d;}location~.*.(js|css)?${expires1h;}access_logoff;}server{listen80;server_namewww.centoscn.commm.centoscn.comcentoscn.com;indexindex.htmlindex.htmindex.php;root/data/htdocs/www/centoscn;location/{rewrite^/(.*)/product/([0-9]+)/$/搜索引擎优化product.php?spell=$1&productid=$2;rewrite^/brand/(.*)/page/([0-9]+)/$/搜索引擎优化brand.php?spell=$1&page=$2;rewrite^/brand/(.*)/$/搜索引擎优化brand.php?spell=$1;}location~.*.(php|php5)?${#fastcgi_passunix:/tmp/php-cgi.sock;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;includefcgi.conf;fastcgi_paramSCRIPT_FILENAME/data/htdocs/www/very365$fastcgi_script_name;fastcgi_paramSCRIPT_NAME/data/htdocs/www/very365$fastcgi_script_name;}location~.*.(gif|jpg|jpeg|png|bmp|swf)${expires30d;}location~.*.(js|css)?${expires1h;}access_logoff;}server{listen80;server_namewww.wqueen.cnwqueen.cn;indexindex.htmlindex.htmindex.php;root/data/htdocs/www/wqueen/bbs;location~.*.(php|php5)?${#fastcgi_passunix:/tmp/php-cgi.sock;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;includefcgi.conf;}location~.*.(gif|jpg|jpeg|png|bmp|swf)${expires30d;}location~.*.(js|css)?${expires1h;}access_logoff;}server{listen80;server_namebaobei.wqueen.cn;indexindex.htmlindex.htmindex.php;root/data/htdocs/www/baobei;location~.*.(php|php5)?${#fastcgi_passunix:/tmp/php-cgi.sock;fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;includefcgi.conf;}location~.*.(gif|jpg|jpeg|png|bmp|swf)${expires30d;}location~.*.(js|css)?${expires1h;}access_logoff;}}
复制代码
小知识:CentOS是一个基于RedHatLinux提供的可自由使用源代码的企业级Linux发行版本。 |
|