In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the Yii2 configuration Nginx pseudo-static method, combined with the example form analysis of the Yii2 framework for Nginx pseudo-static related configuration skills, friends need to refer to the following
This example describes the Yii2 configuration Nginx pseudo-static method. Share it for your reference, as follows:
Check the following codes:
location / { # Redirect everything that isn't a real file to index.php try_files $uri uri//index.php? uri/ /index.php? uri//index.php? args;}
Complete Code:
server { charset utf-8; client_max_body_size 128M; listen 80; ## listen for ipv4 #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 server_name mysite.local; root /path/to/basic/web; index index.php; access_log /path/to/basic/log/access.log; error_log /path/to/basic/log/error.log; location / { # Redirect everything that isn't a real file to index.php try_files $uri uri//index.php? uri/ /index.php? uri//index.php? args; } # uncomment to avoid processing of calls to non-existing static files by Yii #location ~ . (js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { # try_files KaTeX parse error: Expected 'EOF', got '#' at position 11: uri =404; #̲} #error_page 4…{ include fastcgi_params; fastcgi_param SCRIPT_FILENAME documentroot/document_root/documentroot/fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; #fastcgi_pass unix:/var/run/php5-fpm.sock; try_files $uri =404; } location ~ /. (ht|svn|git) { deny all; }}
More about Yii related content interested readers can view this site topics: "Yii framework introduction and common skills summary","php excellent development framework summary","smarty template introduction basic tutorial","php object-oriented programming introduction tutorial","php string (string) usage summary","php+mysql database operation introduction tutorial" and "php common database operation skills summary"
I hope this article will be helpful for PHP programming based on the Yii framework.
Article source: Search Engine Daquan www.iis7.com/b/ssyqdq/
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.