lnmp环境配置nginx虚拟主机

评论 3 点赞 2 人气 5166

配置nginx虚拟主机

cbbtop域名事先解析

 

vi /usr/local/nginx/conf/nginx.conf

==èwww.cbb.com公司网站  

server

        {

                listen       80;

                server_name www.cbb.com;

                index index.html index.htm index.php;

                root  /home/wwwroot/default/cbb;

 

                location ~ .*\.(php|php5)?$

                        {

                                try_files $uri =404;

                                fastcgi_pass  unix:/tmp/php-cgi.sock;

                                fastcgi_index index.php;

                                include fcgi.conf;

                        }

}

 

==èwww.top.com公司网站

 

server

        {

                listen       80;

                server_name www.top.com;

                index index.html index.htm index.php;

                root  /home/wwwroot/top;

 

                location ~ .*\.(php|php5)?$

                        {

                                try_files $uri =404;

                                fastcgi_pass  unix:/tmp/php-cgi.sock;

                                fastcgi_index index.php;

                                include fcgi.conf;

                        }

        }

重启nginx

/etc/init.d/nginx restart



*更多学习视频资料请关照博主的星球,扫一扫下方的星球二维码加入
更多学习视频资料请关照博主的星球,扫一扫下方的星球二维码加入

*更多区块链技术视频资料请关照博主的星球,扫一扫下方的星球二维码加入
更多区块链技术资料请关照博主的星球,扫一扫下方的星球二维码加入

*喜欢本文章觉得有帮助的话,扫个打赏码,给博主打赏个买菜钱$
喜欢本文章觉得有帮助的话,扫个打赏码,给博主打赏个买菜钱

留言板:
  1. cbbtop博客留言板-lnmp环境配置nginx虚拟主机 Judix

    wf8W0H http://www.LnAJ7K8QSpfMO2wQ8gO.com

    回复
  2. cbbtop博客留言板-lnmp环境配置nginx虚拟主机 Judi

    8GctUu https://www.genericpharmacydrug.com

    回复