1. 程式人生 > >lnmp nginx增加對thinkphp5的支援

lnmp nginx增加對thinkphp5的支援

lnmp vhost add 新增完後,修改域名配置檔案

12root  /home/wwwroot/域名目錄/public;    //工作目錄配置到public

修改fastcgi.conf

12#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/../:/tmp/:/proc/";

配置重寫,統一放在 other.conf,因為所有的域名配置檔案均引用了該配置

12345location / {if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?s=/$1 last;}}