thinkphp5 nginx.conf 配置

thinkphp5   nginx.conf  配置

server
{
    listen 80;
#域名 server_name youzuoapi.osd-asia.com; index index.php index.html index.htm default.php default.htm default.html;
  #项目目录 root /www/web/youzuo/public; location / { if ( -f $request_filename) { break; } if ( !-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } #后台重写规则 location /admin/ { if ( !-e $request_filename) { rewrite ^/admin/(.*)$ /admin/index.php/$1 last; break; } } location ~ \.php { set $script $uri; set $path_info ""; if ($uri ~ "^(.+\.php)(/.+)") { set $script $1; set $path_info $2; } include fastcgi_params; fastcgi_index index.php; fastcgi_pass 127.0.0.1:9000; fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$script; fastcgi_param SCRIPT_NAME $script; try_files $uri =404; } access_log /www/source/nginx/logs/www_access.log; error_log /www/source/nginx/logs/error.log error; }
上一篇:thinkphp5基础


下一篇:在client类中设置访问属性 address,business和individua