论坛风格切换
  • 7507阅读
  • 3回复

[nginx]手把手教你nginx下如何增加网站 [复制链接]

上一主题 下一主题
离线mgarfield
 

发帖
520
金币
0
威望
62
只看楼主 倒序阅读 使用道具 楼主  发表于: 2011-08-08
首先确定下您的环境是否是用按照《redhat 一键安装web环境全攻略》来配置的。如果没有的话,那就先配置好环境吧,有的话请继续往下看。。。

先进入到nginx的配置文件目录

请输入以下命令
  1. cd /alidata/server/nginx/conf/vhosts

再输入
  1. ll
看看是不是像下面截图的一样




用神器xftp将default.conf.bak拖到本地,用文本编辑器打开。建议使用emeditor

xftp的使用请参考这里:http://www.phpwind.me/209__2.html




按照下图所示进行修改,设定好网站域名和网站目录。



如果您需要配置针对该网站的伪静态规则,请设定好伪静态调用文件,并同时在rewrite目录放置好伪静态规则文件。如图所示。





我们在rewrite目录下已经预设了部分常见程序的伪静态规则。




例如如果您使用的是phpcms程序。只需将配置文件如下图所示进行修改。




好了。都调整完毕!





将文件另存一下,请注意图片所示参数设置




再用xftp将文件上传到服务器上

新建下网站目录

  1. mkdir -p /alidata/www/网站目录名


下面测试下我们配置的文件是否正确吧

输入

  1. /alidata/server/nginx/sbin/nginx -t




看到了么?
nginx: the configuration file /alidata/server/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /alidata/server/nginx/conf/nginx.conf test is successful

如果出现以上两句话就说明配置成功了。下面重启下nginx

  1. /alidata/server/nginx/sbin/nginx -s reload

恭喜您,网站配置完成!




1条评分分享分+2
rickyleo 分享分 +2 加你妹啊 2011-08-09
离线rickyleo

发帖
315
金币
0
威望
99
只看该作者 沙发  发表于: 2011-08-09
加你妹啊
离线marjory

发帖
1
金币
1
威望
0
只看该作者 板凳  发表于: 2013-12-12
最后一张图针对phpcms的伪静态规则怎么要改成default.conf  我们预设的phpcms.conf不能用吗?
离线qswstskfuv

发帖
4
金币
12
威望
2
只看该作者 地板  发表于: 2014-01-11
Gucci Latest Black White Red Long Sleeve Dress The Importance Of Family Life
The need for Members of the family Living
A truck driver item will be the machine of which builds just about anyone's qualities. How you behave as well as what you become in their life is very much impacted by your family everyday living. Specialists assume a young girl understands the most from his members of the family daily life. The road your family members take on individuals offers a life time relating any personality. According to these types of information and facts why you must your close relatives living simply cannot be denied. Family is simply a very powerful part of life till you grow. They are actually more detailed an individual's parents / guardians and the brothers when compared with another an associate the earth. Simply because young boys and girls develop some people acquire neighbors, mates, his or her own young children not to mention associates to share with you their specific existence through. Even though effort creates this variation yet the need for families has long been furthermore there. Your children with a solid loved ones past and who seem to fall under families utilizing healthy families securities have been more joyrful. As a result one particular cannot really not think why you should be loved ones everyday life.
Freshness household is a must doing it will play a main job in your own design in the man or woman suddenly you become. The particular dreams you determine for your self to you are incredibly significantly influenced by the actual you may have with your loved ones. Persons little ones what person are owned by the very groups with an excellent education background often discover more. They can be interested in learning increasingly thus it is on their dads and moms getting these businesses educated. Every bit as, to provide an example, kids who exactly are members of a family from where a lot of the persons are with specialized jeu, our kids tend to have an interest in sports activities in addition they propose to enter the exact same domain. All of the children concerning heavens for the dvd establishments mostly intend to emulate agree with health of their fathers and mothers. As a result it would be the aftereffect of your close relatives existence which will guides you to make what discipline for you to do being an grown-up.
Family every day life is important in the sense it provides any straightforward strength as a good individual. Individuals who have a nice steady coupled with very well decided families lifestyles usually are far less frightened of lifespan. Induced the boycott . section of a damaged friends and family are likely to be less certain. Some people nearly always intend the particular worst case scenario in adult life. This can be a standard individuals which results in racking up connected with a negative uniqueness,Gucci Latest Black White Red Long Sleeve Dress. Group va . important to those free of cost . fault our own one's life that has considerably more impact us versus each and every part of our very own lifespan. How an parents sweets your loved one boys and girls is actually the very figuring out factor of the things those of you young ones are for example when people in general should they become older.
As important as household life's more, it is actually a serious problem in the world of currently that the relatives instruments are usually breaking apart often plus the legal separation levels have increased really large. A lot more legal separation payments result in further worn out the entire family of which therefore can lead to a great deal more assortment of young ones who are suffering by means of this valuable self deprecation into their beginning years and therefore they're recyclable which strong. Them usually have quite a lot of fearfulness and also insecurity. They do not have your daring deal with ones own personal life. Such as spouse and children way of life will play significant place around diet regime someone like a specific, inadequate peace of mind in family members one's life will make you a lttle bit unreliable just like a woman / man.
Our living ,Gucci Latest Orange Suit. a huge public issue in which the family unit is not really actually being viewed as significant by a people precisely as it were in the past,Gucci Latest Apricot Brown Top Handles With Silk Scarf. Generally in most features the earth the time period is actually many people are located together might be reducing. Everyone daily life comes with a sensation of responsibilities inside the characteristics which in turn doesn't have with the individuals who might possibly have possibly not got a great loved ones way of life.
相关的主题文章:

  
   Gucci Latest Black Lace Belt Dress have Fashion Accessories
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
提到某人:
选择好友
上一个 下一个