
多个站点很简单。
如果你用的是默认路径安装的话按照下面的步骤 *** 作就可以创建多个站点了
在/usr/local/nginx/conf/vhost/ 这个目录下新建文件 你的域名.conf
将如下内容添加到新建的文件中去:
server
{
listen 80
#listen [::]:80
server_name 你的域名
index index.html index.htm index.php default.html default.htm default.php
root /www/web/web1这里是你站点的根目录
include hlkan.conf
#error_page 404 /404.html
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404to enable pathinfo
try_files $uri =404
fastcgi_pass unix:/tmp/php-cgi.sock
fastcgi_index index.php
include fastcgi.conf
#include pathinfo.conf
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d
}
location ~ .*\.(js|css)?$
{
expires 12h
}
access_log off
}
3. 然后执行 /root/lnmp reload 就好了
个人建站的办法很简单,首先网站服务器选择1核2G1M,40G高效云盘。要准备以下的资料
选择云服务器,例如阿里或者腾讯等
国内服务器要备案,hk和国外服务器不用。
建立网站环境,这时候用lnmp环境,速度更快,安装 wp程序。
安装wp过程就很简单了,按照页面提示输入数据库名、账号密码,然后输入网站title,后台账号密码,邮箱,安装成功就可以了
解析域名到服务器
WordPress程序选择的主机配置应该支持php。支持伪静态。首选Linux系统主机。
请点击输入图片描述
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)