首页 > 其他 > 详细

LNMP综合配置

时间:2018-04-16 10:11:22      阅读:177      评论:0      收藏:0      [点我收藏+]
Nginx默认虚拟主机
vim /usr/local/nginx/conf/nginx.conf //增加
 include vhost/*.conf
 mkdir /usr/local/nginx/conf/vhost
 cd !$;  vim default.conf //加入如下内容
server
{
    listen 80 default_server;  // 有这个标记的就是默认虚拟主机
    server_name aaa.com;
    index index.html index.htm index.php;
    root /data/wwwroot/default;
}
 mkdir -p /data/wwwroot/default/
 echo “This is a default site.”>/data/wwwroot/default/index.html
 /usr/local/nginx/sbin/nginx -t
 /usr/local/nginx/sbin/nginx -s reload
 curl localhost
 curl -x127.0.0.1:80 123.com

LNMP综合配置

原文:http://blog.51cto.com/chenshengsheng/2103780

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!