nginx服务器解析域名
可以使用xshell便捷的使用指令快捷的查找的你的域名配置文件
whereis nginx
nginx:/usr/local/nginx //nginx路径
找到你所属文件路径的文件.conf
打开文件进行配置
server{
listen: 80;
server_name:liliangliang.com; //自己的域名
location:{
root: /html/www/my; //域名指向的文件夹
index index.html index.htm //默认打开文件夹的index.html 这个可以随便配置你的默认指向
}
}
然后在打开xshell进行重启
.nginx -s reload
这样浏览器上输入你的域名进行打开就行了
(自己现学现卖,欢迎大家一起来交流 qq:1140842430)