问题:thinkPHP在nginx中运行
因为我想把thinkPHP运行在k3上。而k3路由器装的是onmp,所以就需要配置nginx:
在我的配置文件中做以下修改,使其支持phpinfo(otherconf以下)
server { listen 91; server_name localhost; root /opt/wwwroot/Zblog/; index index.html index.htm index.php tz.php; include /opt/etc/nginx/conf/php-fpm.conf; #otherconf location / { root /opt/wwwroot/Zblog; index index.html index.php; if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; } } location ~ \.php$ { root /opt/wwwroot/Zblog; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }