|
- server{
- listen 80; #监听的端口号
- server_name www.epower.cn; #域名
- location / {
- root /web/epower; #站点的路径
- index index.php index.html index.htm;
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php$1 last;
- }
- }
- location ~ ^.+\.php {
- root /web/epower; #站点的路径
- fastcgi_pass 127.0.0.1:9000; #根据自己的 php-fpm 配置填写
- fastcgi_index index.php;
- ###配置支持pathinfo
- fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
复制代码
由于epower程序采用thinkphp 进行开放,在采用nginx的web价格在设置好伪静态后,同时也要开启pahtinfo
|
|