时间:2021-07-01 10:21:17 帮助过:57人阅读
1.在ngxin.conf配置location
...
server {
listen 80 default;
server_name _;
index index.html index.htm index.php;
root /alidata/www/default;
location ~ .*\.(php|php5|py)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log /alidata/log/nginx/access/default.log;
}
...
security.limit_extensions = .php .php3 .php4 .php5 .py
以上就介绍了nginx+php之任意类型(.py)解释为php配置方式,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。