In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to turn on the phpinfo mode function of nginx under linux/windows". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The copy code is as follows:
Location ~\ .php (. *) ${
Fastcgi_pass unix:/tmp/php-cgi.sock
Fastcgi_index index.php
Fastcgi_split_path_info ^ (. +\ .php) (. *) $
Fastcgi_param script_filename $document_root$fastcgi_script_name
Fastcgi_param path_info $fastcgi_path_info
Fastcgi_param path_translated $document_root$fastcgi_path_info
# include fastcgi_params
Include fcgi.conf
}
An example of a complete site configuration:
The copy code is as follows:
Log_format v.lzw.me'$remote_addr-$remote_user [$time_local] "$request"'
'$status $body_bytes_sent "$http_referer"'
'"$http_user_agent" $http_x_forwarded_for'
Server {
Listen 80
Server_name v.lzw.me
Index index.html index.htm index.php default.html default.htm default.php
Root / www/v.lzw.me
# urlrewrite
Include v.lzw.me.conf
Location ~\ .php (. *) ${
Fastcgi_pass unix:/tmp/php-cgi.sock
Fastcgi_index index.php
Fastcgi_split_path_info ^ (. +\ .php) (. *) $
Fastcgi_param script_filename $document_root$fastcgi_script_name
Fastcgi_param path_info $fastcgi_path_info
Fastcgi_param path_translated $document_root$fastcgi_path_info
# include fastcgi_params
Include fcgi.conf
}
Location. *\. (gif | jpg | jpeg | png | bmp | swf) ${
Expires 30d
}
Location. *\. (js | css)? ${
Expires 12h
}
Access_log / wwwlogs/v.lzw.me.log v.lzw.me
}
Refer to other methods (suitable for nginx under windows, etc.):
The copy code is as follows:
Location\ .php
{
Fastcgi_pass 127.0.0.1:9000
Fastcgi_index index.php
Include fcgi.conf
Set $real_script_name $fastcgi_script_name
If ($fastcgi_script_name ~ "^ (. +?\ .php) (/. +) $") {
Set $real_script_name $1
Set $path_info $2
}
Fastcgi_param script_filename $document_root$real_script_name
Fastcgi_param script_name $real_script_name
Fastcgi_param path_info $path_info
}
This is the end of the content of "how to turn on the phpinfo mode function of nginx under linux/windows". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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: 204
*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.