使用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 Linux
This script is a tool to add virtual host
for
nginx
For
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,这里输入y
Type 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.conf
Test Nginx configure
file
......
nginx: the configuration
file
/usr/
local
/nginx/conf/nginx.conf syntax is ok
nginx: configuration
file
/usr/
local
/nginx/conf/nginx.conf
test
is successful
Restart Nginx......
=========================================================================
Add Virtual Host
for
LNMP V0.9 , Written by Licess
=========================================================================
For
more
information please visit http://www.lnmp.org/
Your domain:xqblog.com
Directory of xqblog.com:/home/xqblog.com
=========================================================================
[教程分享]历史优惠活动内容
猜你可能想看的VPS
- GigsGigsCloud 日本 VPS 上线 分为 CN2 和软银线路日本VPS[主机]
- 199 元 年 1G 内存 20G 硬盘 2Mbps@不限量 KVM 香香港VPS[主机]
- TheStack→$7 月 4 核 4GB 内存 60GB 空间 2TB虚拟空间(主机)
- Laravel 安装过程报错 PHP extension mcrypt 全球[VPS测评]
- 极客主机 - 新加坡 CN2 VPS 永久 8 折优惠码全球[VPS测评]
- 微基主机 7 月促销→美国主机 65 折优惠 日本 CN2 VPS 首月日本VPS[主机]
- 真实测评 桔子数据→洛杉矶 CN2 GIA 1 核 1G 20G 硬盘 全球[VPS测评]
- 桔子数据→28 元 月 1GB 内存 40GB SSD 空间 500GB虚拟空间(主机)
- spinservers→$99 月 2*e5-2630L v2 64g 美国VPS[主机]
- 虎字下面的几换成了蛇字是什么成语?全球[VPS测评]
- Poli Systems→$11.19 月 1 核独享 4GB 内存 2虚拟空间(主机)
- 如何实现通过Gzip压缩实现WordPress站点加速的各种方法全球[VPS测评]
- WordPress插件:Username Changer直接修改用户名全球[VPS测评]
- 建站云服务器选择高效云盘还是SSD硬盘?全球[VPS测评]
- 如何为WordPress网站站外链接添加自动nofollow功能全球[VPS测评]
- 2022年开源 WordPress 免费主题推荐全球[VPS测评]
- millenial 3刀香港vps 测评香港VPS[主机]
- 修罗香港IPLC → 1核 256M内存 单向50GB 15mbps →香港VPS[主机]
- on9host 1核心 512M内存 15G 储存 500G流量 30M全球[VPS测评]
- 九零云怎么样?香港将军澳VPS,美国圣何塞VPS 2核1G10M 47/美国VPS[主机]
- 用玩客云做打印服务器,让你在手机上轻松实现无线打印全球[VPS测评]
- 磐逸云怎么样?香港沙田cn2vps 带宽5M年付128元香港VPS[主机]
- DMIT:香港/洛杉矶GIA等KVM VPS,黑五DMIT优惠码活动,稳香港VPS[主机]
- 什么是linux面板?常见的Linux控制面板有哪些?全球[VPS测评]
- 2.45亿、成都公安(大数据基座-服务器)采购:神码、虹信、海康、超聚变全球[VPS测评]
- 二三互联年末回馈:香港/美国云服务器新购特价促销,优惠码可打76折美国VPS[主机]
- 桔子数据:1核1GB香港CN2 GIA vps促销28元/月,最高30M香港VPS[主机]
- 拼多多拟建跨境电商平台:挖角SHEIN员工,0佣金招商入驻全球[VPS测评]
- 从阿里云七代云服务器,谈云计算四大趋势全球[VPS测评]
- 购买香港服务器需要做哪些准备香港VPS[主机]
转载请注明原文地址:https://www.motoll.com/read-77743.html