In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to configure TP5.1 in Nginx and the problems encountered. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1.Nginx user's access to the project directory
Cd / usr/local/nginx/html/setfacl-m u:nginx:rwx-R.. / html2. Make sure that the access path is correct. It is best to test the access URL path locally and access the file correctly.
3.nginx supports pathinfovi / usr/local/nginx/conf/nginx.conf of tp
The location found in the nginx.conf configuration file is modified as follows
Location ~\ .php$ {# root html; # this path points to root / usr/local/nginx/html/zh/public; fastcgi_index index.php; fastcgi_pass 127.0.0.1 root 9000; # fastcgi_pass unix:/usr/local/php/var/run/www.sock Fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_split_path_info ^ (. +\ .php) (. *) $; # add the sentence fastcgi_param PATH_INFO $fastcgi_path_info; # add this sentence include fastcgi_params;} 4.nginx rewrite rewriting rule vi / usr/local/nginx/conf/nginx.conf
The location found in the nginx.conf configuration file is modified as follows
Server {listen 80; server_name www.liuyuanshan.top; # charset koi8-r; # access_log logs/host.access.log main; location / {# root html; # set the www.liuyuanshan.top default access path to / usr/local/nginx/html/zh/public/ root / usr/local/nginx/html/zh/public/ Index index.php index.html index.htm; if (!-e $request_filename) {rewrite ^ (. *) $/ index.php?s=/$1 last }} this is the end of the article on "how to configure TP5.1 in Nginx and the problems encountered". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.