Yiinghistory Rewrite Rules

Source: Internet
Author: User
Is nginx? Rewrite server {set $ host_pathdatasitewww.ttlsa.com; slave; server_namettlsa.comwww.ttlsa.com; root $ host_pathhtdocs; set $ yii_bootstrapindex.php; # definecharset

Is nginx? Yii rewrite server {set $ host_path "/data/site/www.ttlsa.com"; access_log/data/logs/nginx/www.ttlsa.com _ access. log main; server_name ttlsa.com www.ttlsa.com; root $ host_path/htdocs; set $ yii_bootstrap "index. php "; # define charset

Is nginx? Rewrite of yii
Server {set $ host_path "/data/site/www.ttlsa.com"; access_log/data/logs/nginx/www.ttlsa.com _ access. log main; server_name ttlsa.com www.ttlsa.com; root $ host_path/htdocs; set $ yii_bootstrap "index. php "; # define charset UTF-8; location/{index index.html $ yii_bootstrap; try_files $ uri // $ yii_bootstrap? $ Args;} # deny access to protected directories location ~ ^/(Protected | framework | themes/w +/views) {deny all;} # avoid processing of callto unexisting static files by yii location ~. (Js | css | png | jpg | gif | swf | ico | pdf | mov | fla | zip | rar) $ {try_files $ uri = 404 ;} # prevent nginx from serving dotfiles (. htaccess ,. svn ,. git, etc .) location ~ /. {Deny all; access_log off; log_not_found off;} # php-fpm configuration using socket location ~. Php {fastcgi_split_path_info ^ (. +. php )(. *) $; # yii catches the callto unexising PHP files set $ fsn/$ yii_bootstrap; if (-f $ document_root $ fastcgi_script_name) {set $ fsn $ fastcgi_script_name;} fastcgi_pass unix: /tmp/php5-fpm.sock ;#? Change to your FastCGI include fastcgi_params; fastcgi_param SCRIPT_FILENAME $ document_root $ fsn; # PATH_INFO and PATH_TRANSLATED can be omitted, but RFC 3875 specifies them for CGI fastcgi_param PATH_INFO $ response; fastcgi_param PATH_TRANSLATED $ document_root $ fsn; # Tweak fastcgi buffers, just in case. fastcgi_buffer_size 128 k; fastcgi_buffers 256 4 k; fastcgi_busy_buffers_size 256 k; fastcgi_temp_file_write_size 256 k ;}}

Original article address: yii nginx rewrite rules. Thank you for sharing them.

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.