使用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
- 带宽小-Xiuluohost→香港 VPS 1 核 256M 内存 11香港VPS[主机]
- 九个格子中间偏下的两个格子中分别写着正和怀是什么成语?全球[VPS测评]
- 双十一 标准互联→所有云服务器买两年送一年 香港直连线路 美国圣何塞 C美国VPS[主机]
- Krypt→ION 平台圣何塞节点上线 8 折优惠码 CN2 优化全球[VPS测评]
- WordPress代码实现用户注册时验证邮箱真实性全球[VPS测评]
- 星轮数据 美国200G高防VPS 月付38元 香港BGP线路 月付仅需1美国VPS[主机]
- Debian 10 如何启用 BBR 加速全球[VPS测评]
- SwanCloud(天鹅云)阿里云国际版正规分销商 无须信用卡/PayP全球[VPS测评]
- Delta.BG → 6$ 月 罗马尼亚VPS 1C1G25G硬盘 1T全球[VPS测评]
- ExtraVm 日本东京VPS测试(10Gbps无限流量)日本VPS[主机]
- mrvm-法国7刀 年 OVZ NAT VPS ikoula线路 测评全球[VPS测评]
- 补货! 联通用户首选 -搬瓦工日本软银限量版 → $65.38美金年付日本VPS[主机]
- Wikihost CN2 香港虚拟主机 → 独立IP → 限量446元独立服务器[U]
- OLVPS 512 内存 10G SSD 512G流量 1Gbps 俄罗全球[VPS测评]
- HKServerSolution → 1核心 2G内存 20G SSD 全球[VPS测评]
- Virmach → $1.5 月付 512M 内存 10G SSD硬盘 全球[VPS测评]
- 拼多多正筹建跨境电商平台:密集挖角SHEIN员工,零佣金招商入驻全球[VPS测评]
- cmivps:全场7折,香港不限流量VPS,Windows系统,LinuWINDOWS
- 岚云:香港安迅/沙田CN2直连,75折起,1核/1G/30G SSD/1香港VPS[主机]
- RFCHost:1核1G洛杉矶vps/15GB空间/1TB流量/KVM/虚拟空间(主机)
- wordpress 上传附件报错 “抱歉,出于安全的考虑,不支持此文件类全球[VPS测评]
- 1分钟快速读懂云计算全球[VPS测评]
- 亿速云香港服务器助力企业出海 有哪些具体的特点和优势?香港VPS[主机]
- 亿速云双12年终回馈:云服务器2折活动,订单满100元减50元全球[VPS测评]
- 阿里云香港vps怎么样?阿里云香港、新加坡云主机如何购买?香港VPS[主机]
- 2021年UCloud云服务器价格表,UCloud全球云主机租用报价表全球[VPS测评]
- 者也vps年终特惠:全场云服务器7折终身优惠,赠1G内存,充1000送3全球[VPS测评]
- 95IDC :香港vps优惠活动,1核2G月付折后25元;香港物理机低至香港VPS[主机]
- 好朋友51WORLD启动“地球克隆计划5”,我要去元宇宙参加了全球[VPS测评]
- UCloud香港云主机怎么样?UCloud香港云主机1核1G1M评测香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-77743.html











