服务器环境是lnmp;现在这个服务器上已经有一网站www.example.cc,现在我想新增一网站,用www.example.cc/backhome的方式打开这个网站,但是这个网站是tp5开发的,我应该怎么放上去,在nginx的conf里面怎么设置呢?
conf里面内容
server
{
listen 80;
server_name www.example.cc;
index index.html index.htm index.php;
root /data/wwwroot/www.example.cc;
error_log /var/log/nginx/www.example.cc-error.log crit;
access_log /var/log/nginx/www.example.cc-access.log;
include extra/*.conf;
include conf.d/rewrite/thinkphp.conf;
#------------- SSL Start --------------
#------------- SSL End ---------------
location /backhome
{
alias /data/wwwroot/backhome/public/;
index index.php index.html;
location ~ ^/backhome/.+\.php$ {
alias /data/wwwroot/backhome/public/;
fastcgi_pass unix:/dev/shm/php-fpm-default.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /data/wwwroot/backhome/$fastcgi_script_name;
include fastcgi_params;
}
include conf.d/extra/*.conf;
}
}