lnmp一键安装包 配置多站点
Posted 咸鱼想翻身
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了lnmp一键安装包 配置多站点相关的知识,希望对你有一定的参考价值。
在/usr/local/nginx/conf/vhost下配置多站点的文件,一个站点对应一个文件,配置如下信息:
vim ./vhost/test.conf
server { listen 80; server_name www.centos.com centos.com; root /home/wwwroot/test; location / { index index.php; #autoindex on; } location ~ \.php$ { include /usr/local/nginx/conf/fastcgi.conf; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_param SCRIPT_FILENAME /home/wwwroot/test$fastcgi_script_name; } }
vim ./vhost/mytest.conf
server { listen 80; server_name www.centostest.com centostest.com; root /home/wwwroot/centostest; location / { index index.php; #autoindex on; } location ~ \.php$ { include /usr/local/nginx/conf/fastcgi.conf; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_param SCRIPT_FILENAME /home/wwwroot/centostest$fastcgi_script_name; } }
以上是关于lnmp一键安装包 配置多站点的主要内容,如果未能解决你的问题,请参考以下文章
lnmp一键安装包,安装多版本php,并开启redis与swoole