Nginx新建虚拟主机:
/root/vhost.sh
Please input domain:
(Default domain: www.lnmp.org):www.haiyun.me #输入新建虚拟机域名
===========================
domain=www.haiyun.me
===========================
Do you want to add more domain name? (y/n) #是否添加其它域名y或n
y
Type domainname,example(www.haiyun.me):
www.haiyun.me
===========================
domain list=www.haiyun.me
===========================
Please input the directory for the domain:www.haiyun.me :
(Default directory: /home/wwwroot/www.haiyun.me): #网站默认目录
Allow Rewrite rule? (y/n) #是否添加伪静态支持y或n
Please input the rewrite of programme :
wordpress,discuz,typecho,sablog,dabr #这些程序有默认伪静态规则
(Default rewrite: other): #输入该虚拟机伪静态文件名称,如discuz
Allow access_log? (y/n) #是否开启日记
Type access_log name(Default access log file:www.haiyun.me.log): #日记文件目录
最后按确认键创建完成。
LNMP管理:
/root/lnmp stop #停止lnmp
/root/lnmp start #启动lnmp
/root/lnmp restart #重启lnmp