使用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
- vultr 充 10 刀送 25 刀活动全球[VPS测评]
- 超优惠 磐石云元旦特惠→1 核 2G 内存 50G 硬盘 2G 防御 三全球[VPS测评]
- 疯狂猜成语 图猜成语一个美女和一滩水是什么成语?全球[VPS测评]
- kvmla 折上折促销,香港 日本 新加坡,vps8 折+充 500 送独立服务器[U]
- BuyVM→$3.5 月 KVM-1GB 20GB 无限流量 拉斯维加斯全球[VPS测评]
- VPS 测评 搬瓦工 DC8 机房→KVM 512M 内存套餐全球[VPS测评]
- 阿里云 2020 年 1 月促销:国内 香港云服务器 2 核 8G5M1香港VPS[主机]
- Ramnode 充值送 25% KVM 月费 3 美元起 支持小时计费 全球[VPS测评]
- XenSpec→$2.4 月 KVM-1GB 10GB 无限流量(1Gb全球[VPS测评]
- Linode - 新增独立 CPU 实例 Dedicated CPU I独立服务器[U]
- XSServer→€2.69 月 2GB 内存 20GB SSD 空间 虚拟空间(主机)
- eCoinVPS→$7.6 年 512MB 内存 10GB NVMe 空虚拟空间(主机)
- 介绍一批速度快的香港服务器 高速直连 免备案 带宽大 内容宽松香港VPS[主机]
- 如何将typecho转换到WordPress?全球[VPS测评]
- Buyvm拉斯维加斯和卢森堡机房 VPS 补货,$3.5起/月,AMD 全球[VPS测评]
- AlphaVPS 1核心 1G内存 512G HDD 1.5T流量 1G全球[VPS测评]
- 咸鱼科技(Saltyfish)美国费里蒙 圣何塞CN2 GIA → 促销美国VPS[主机]
- Olvps → 256M内存 5G 储存 512G流量 30Mbps 全球[VPS测评]
- 漂亮的Css3响应侧边栏菜单,动画风格侧边栏导航菜单样式全球[VPS测评]
- 源云主机,香港沙田VPS CN2 1核1G 24/月 NTT 50M 9香港VPS[主机]
- 极光KVM:新上香港CN2VPS,终身6折优惠,1核/1G/5Mbps,香港VPS[主机]
- 精编案例丨游戏行业转型升级迫在眉睫,云计算助力打造下一代游戏体验全球[VPS测评]
- 快速云:云服务器vps的区别是什么云服务器和vps哪个比较好2022-0全球[VPS测评]
- 葫芦云:香港CN2/洛杉矶GIA高防vps,24元/月;1核/1GB/2虚拟空间(主机)
- 阿里云香港服务器价格优惠:老用户香港2核4G3M云服务器仅1181.5元香港VPS[主机]
- PangHost:香港CN2云服务器VPS月付29元,美国洛杉矶高防vp美国VPS[主机]
- 常见的CN2,GIA,CIA 各个网络线路解释全球[VPS测评]
- 欧亚云:新春优惠,洛杉矶CERA云主机仅25元/月起,香港CN2仅28元香港VPS[主机]
- 快速云:vps云服务器的区别是什么?2022-08-1913:32来源:全球[VPS测评]
- 金斗云双12活动:全场8折起,美国圣何塞CN2 GIA高防VPS20元/美国VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-77743.html











