仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 503|回复: 8
打印 上一主题 下一主题

[CentOS(社区)] 带来一篇nginx.conf(多虚拟主机)设置装备摆设文件参考

[复制链接]
再见西城 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-14 21:06:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
小知识:CentOS是企业Linux发行版领头羊RedHatEnterpriseLinux(以下称之为RHEL)的源代码再编译版本。
我的临盆情况下的nginx.conf设置装备摆设文件,做了虚拟主机设置的,人人可以依据需求更改,下载便可在本身的机械上应用了,本设置装备摆设文件摘录自《构建高可用Linux办事器》(机械工业出书社),转载费事注明出处,感谢,设置装备摆设文件以下:

  1. 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发行版本。
柔情似水 该用户已被删除
沙发
发表于 2015-1-17 05:36:10 | 只看该作者
当然你不需搭建所有服务,可以慢慢来。自己多动手,不要非等着别人帮你解决问题。
乐观 该用户已被删除
板凳
发表于 2015-1-26 12:51:51 | 只看该作者
掌握在Linux系统中安装软件,在安装Linux工具盘后大致日常所需的软件都会有,一般网络提供下载的软件都会有安装说明。
谁可相欹 该用户已被删除
地板
发表于 2015-2-4 20:55:14 | 只看该作者
发问的时候一定要注意到某些礼节。因为Linux社区是一个松散的组织、也不承担回复每个帖子的义务。它不是技术支持。
5#
发表于 2015-2-10 10:59:11 | 只看该作者
为什么要学Linux呢?每个人都有不同的看法,下面我说说自己的感想吧。?
冷月葬花魂 该用户已被删除
6#
发表于 2015-3-1 13:07:27 | 只看该作者
就这样,我们一边上OS理论课,一边上这个实验,这样挺互补的,老师讲课,一步一步地布置任务
分手快乐 该用户已被删除
7#
发表于 2015-3-10 21:21:26 | 只看该作者
清楚了解网络的基础知识,特别是在Linux下应用知识,如接入internet等等。
只想知道 该用户已被删除
8#
发表于 2015-3-17 16:29:08 | 只看该作者
硬盘安装及光盘安装,清楚了解安装Linux应注意的有关问题,如安装Linux应在最后一个分区内,至少分二个分区。
透明 该用户已被删除
9#
发表于 2015-3-24 19:44:02 | 只看该作者
熟读Linux系统有关知识,如系统目录树,有关内容可购书阅读或搜索论坛。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-5-19 15:33

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表