Nginx Server Configuration PathInfo mode (to solve the dolphin PHP background infinite redirection problem)

Source: Internet
Author: User
Tags nginx server
This article mainly introduces the Nginx server configuration PathInfo mode (to solve the dolphin PHP background infinite redirection problem), has a certain reference value, now share to everyone, the need for friends can refer to

server {Listen 80;  server_name www.yxk.cn yxk.cn;  Access_log/data/wwwlogs/www.yxk.cn_nginx.log combined;  Index index.html index.htm index.php;  Root/data/wwwroot/www.yxk.cn/public;  if ($host! = www.yxk.cn) {return 301 $scheme://www.yxk.cn$request_uri;  } include/usr/local/nginx/conf/rewrite/thinkphp.conf;  #error_page 404/404.html;    #error_page 502/502.html;    Location ~ [^/]\.php (/|$) {Fastcgi_pass unix:/dev/shm/php-cgi.sock;    Fastcgi_index index.php;    Fastcgi_split_path_info ^ (. +\.php) (. *) $;    Fastcgi_param path_info $fastcgi _path_info;    Fastcgi_param script_filename $document _root$fastcgi_script_name;    Include Fastcgi_params;    #include fastcgi.conf;  #include pathinfo.conf; } location ~. *\.    (Gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico) $ {expires 30d;  Access_log off; } location ~. *\.    (JS|CSS)? $ {Expires 7d;  Access_log off;  } location-/\.ht {deny all; }}thinkphp.conf File Contents: Location/{if (!-e $request _filename) {rewrite ^ (. *) $/Index.php?s=/$1 last;  Break }}

Related recommendations:

PHP nginx Server Configuration Support PathInfo

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.