In the Nginx server set UWA pseudo-static, you need to modify Nginx configuration file. PHP Settings section: Location ~ \.php {# The following two behaviors to avoid, *.php file does not exist, and php-fpm (PHP FastCGI) returned no input file specified error, direct point to the site root directory
Enterprise Template site Sharing
In the Nginx server set UWA pseudo-static, you need to modify Nginx configuration file. PHP Settings section: Location ~ \.php { # The following two behaviors to avoid, *.php file does not exist, and PHP-FPM (PHP FastCGI) return no input file specified error, direct point to the site root directory 404.html Try_files $uri/www/lib/404/404.error.html; Fastcgi_intercept_errors off; Fastcgi_pass 127.0.0.1:1234; #1234根据自己的PHP端口设置 Fastcgi_index index.php; Fastcgi_param script_filename $document _root$fastcgi_script_name; Include Fastcgi_params; # The following is to allow Nginx to support path_info Set $path _info ""; Set $real _script_name $fastcgi _script_name; if ($fastcgi _script_name ~ "^ (. +?\.php) (/.+) $") { Set $real _script_name $; Set $path _info; } Fastcgi_param script_filename $document _root$real_script_name; Fastcgi_param script_name $real _script_name; Fastcgi_param path_info $path _info; Fastcgi_connect_timeout 120; Fastcgi_send_timeout 120; Fastcgi_read_timeout 120; Fastcgi_buffers 8 128K; Fastcgi_buffer_size 128K; } Site section: server { Listen 80; server_name asthis.net; #网站域名 Root/www/root/uwa; #网站根目录 CharSet UTF-8; #网站编码 Location/{ if (!-e $request _filename) {#如果没有找到相应文件 Rewrite ^/(. *) $/index.php/$1 last; #设置伪静态规则 } Index index.php; } Include PHP; Include error; } |
PHP Settings: Nginx Server pseudo-static how to set?