nginx、thinkphp3.2、linux配置檔案配置
nginx.conf配置檔案:
server {
listen 9001;
server_name 127.0.0.1;
index index.php;
root /data/mobissp/mobissp_ad/;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
#include /mnt/project/.htaccess;
location / {
#index index.php;
#ThinkPHP REWRITE支援
#if (!-e $request_filename) {
# rewrite ^/(.*)$ /index.php?s=$1 last;
#}
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
}
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
thinkphp3.2的url模式要改
URL_MODEL要改為3