使用LNMP域名绑定详解
|
![]() |
![]() |
![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |
Linux系统下,一键搭建nginx+php+mysql+phpmyadmin常用网站环境一般使用的是军哥的LNMP一键安装(Linux lnmp一键安装包相关使用教程),在安装好之后就是域名的绑定啦!其实所谓的域名绑定,就是通过命令的形式,简易创建一个conf文件到/usr/local/nginx/conf/vhost下面,这个过程完全可以手工创建conf,或者,平时修改目录、域名等,直接修改conf文件,效果完全一样:
/root/vhost.sh #lnmp域名绑定命令=========================================================================Add Virtual Host for LNMP V0.9 , Written by Licess=========================================================================LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on LinuxThis script is a tool to add virtual host for nginxFor more information please visit http://www.lnmp.org/=========================================================================Please input domain:(Default domain: www.lnmp.org):xqblog.com #输入你要绑定的域名,xqblog.com和www.xqblog.com要分别绑定===========================domain=xqblog.com===========================Do you want to add more domain name? (y/n)y #是否添加子域名,可以输入y或n,这里输入yType domainname,example(bbs.xqblog.com forums.xqblog.com luntan.xqblog.com):www.xqblog.com #输入你要绑定的其它域名,支持泛解析,例如:*.7vps.net===========================domain list=www.xqblog.com===========================Please input the directory for the domain:xqblog.com :(Default directory: /home/wwwroot/xqblog.com):/home/xqblog.com #网站存放目录,可默认或自行输入===========================Virtual Host Directory=/home/xqblog.com======================================================Allow Rewrite rule? (y/n)===========================y #是否添加伪静态规则,这里输入是Please input the rewrite of programme :wordpress,discuz,typecho,sablog,dabr rewrite was exist.(Default rewrite: other):wordpress #输入wordpress就可以===========================You choose rewrite=wordpress======================================================Allow access_log? (y/n)===========================n #是否创建日志文件,如果不需要可不用Press any key to start create virtul host...#按任意建继续,以下为一些相关信息,包括创建目录,测试nginx等,如果有错误提示,请一定要认真分析Create Virtul Host directory......set permissions of Virtual Host directory......You select the exist rewrite rule:/usr/local/nginx/conf/wordpress.confTest Nginx configure file......nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is oknginx: configuration file /usr/local/nginx/conf/nginx.conf test is successfulRestart Nginx......=========================================================================Add Virtual Host for LNMP V0.9 , Written by Licess=========================================================================For more information please visit http://www.lnmp.org/Your domain:xqblog.comDirectory of xqblog.com:/home/xqblog.com========================================================================= [教程分享]历史优惠活动内容
猜你可能想看的VPS
- 易探云:香港免备案云服务器年付6.8折,2核4G5M+10G数据盘仅79 香港VPS[主机]
- Kvmla:十周年香港/新加坡/日本vps全场年付5折月付8折,新加坡/ 独立服务器[U]
- 天上云:香港CN2弹性云服务器;1核/1G/20G/;促销月付24元起( 香港VPS[主机]
- wordpress 上传附件报错 “抱歉,出于安全的考虑,不支持此文件类 全球[VPS测评]
- 人力资源管理系统前端Web模板 - SmartHR 全球[VPS测评]
- 免备案服务器对权重和网站排名有影响吗? 全球[VPS测评]
- 关键路径、资金情况、政策关键数据中心的可持续发展路径在哪里? 全球[VPS测评]
- 数字化东风已来,亚马逊云科技跨境电商合作企业招募大会即将开启 全球[VPS测评]
- sugarhosts首推DECADE云服务器,香港云服务器,1核512M 香港VPS[主机]
- 阁天互联怎么样?香港cn2云服务器 圣何塞cn2vps仅20/月 香港VPS[主机]
- 磐逸云怎么样?香港沙田cn2vps 带宽5M年付128元 香港VPS[主机]
- locvps:香港cn2vps(葵湾机房),2核2G40g硬盘,8折优惠 WINDOWS
- 景文互联年终活动:云服务器7折,多送2G内存,香港cn2\\日本cn2\ 日本VPS[主机]
- 酷锐云元旦钜惠:大量香港/美国vps优惠码,香港1核2G云主机仅20元/ 美国VPS[主机]
- UCloud香港云服务器:免备案,CN2,全球31个机房,香港2核4G2 香港VPS[主机]
- TmhHost:1核/1G/40G SSD/3Mbps/香港三网CN2 香港VPS[主机]
- 水墨云:2021年特惠活动_IPLC专线/海外CN2/香港/日本/韩国/ 日本VPS[主机]
- 欧路云:香港vps上新8折优惠 – 加拿大/新加坡/法国vps 6折优惠 香港VPS[主机]
- 桔子数据:1核/1G/50Mbps/洛杉矶CUVIP线路/首月14元;香 香港VPS[主机]
- 速云互联:香港GT大带宽vps/香港CN2云服务器/洛杉矶200G高防v 香港VPS[主机]
- 硅云怎么样?硅云服务器好用吗?硅云香港vps多少钱一年? 香港VPS[主机]
- 向日葵-漏洞科普:海外云服务器三种漏洞修复方法快收藏起来! 全球[VPS测评]
- 什么是VPS?国内VPS有哪些? 全球[VPS测评]
- 狗云DogYun,香港cn2云服务器/优惠码/流量包,按小时计费云服务器 香港VPS[主机]
- 印象云vps,香港安畅gia低至22元起,1核1G内存,小带宽无限流量, 香港VPS[主机]
- 碳氧云,香港vps路由调整为沙田cn2,特价款6核6G仅80元/月 香港VPS[主机]
- 极客主机,美国高防/日本软银/新加坡双程CN2/香港VPS 折后39元/ 日本VPS[主机]
- 印象云,香港安畅CN2VPS终身8折1核1G22元/月,美国CN2高防V 美国VPS[主机]
- ExCloud:1核256M存/8GB SSD空间/100GB流量/OV 虚拟空间(主机)
- 宝塔面板在香港服务器安装启动不了nginx怎么办? 香港VPS[主机]
转载请注明原文地址: http://140.238.13.167:12355/read-77743.html











