百度云虚拟主机配置php.ini,百度云虚拟主机配置 Thinkphp5.1

编程入门 行业动态 更新时间:2024-10-16 00:26:05

百度云<a href=https://www.elefans.com/category/jswz/34/1750617.html style=虚拟主机配置php.ini,百度云虚拟主机配置 Thinkphp5.1"/>

百度云虚拟主机配置php.ini,百度云虚拟主机配置 Thinkphp5.1

location /{

root/home/bae/app/public;if (-e $document_root/index.php) {

## 获取正则匹配中的数据,wwwxxx/test/ 实际访问路径问 www.xxx/index.php/test

rewrite^/(.*)$ /index.php/$1?$query_string last;

}return 404;

}

## php配置

location~ [^/]\.php(/|$){

root/home/bae/app/public;

fastcgi_index index.php;

fastcgi_pass127.0.0.1:9000;

fastcgi_intercept_errors on;

fastcgi_split_path_info^(.+\.php)(.*)$;

fastcgi_param PATH_INFO $fastcgi_path_info;

fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param QUERY_STRING $query_string;

fastcgi_param REQUEST_METHOD $request_method;

fastcgi_param CONTENT_TYPE $content_type;

fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SCRIPT_NAME $fastcgi_script_name;

fastcgi_param REQUEST_URI $request_uri;

fastcgi_param DOCUMENT_URI $document_uri;

fastcgi_param DOCUMENT_ROOT $document_root;

fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param REQUEST_SCHEME $scheme;

fastcgi_param HTTPS $https if_not_empty;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;

fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

fastcgi_param REMOTE_ADDR $remote_addr;

fastcgi_param REMOTE_PORT $remote_port;

fastcgi_param SERVER_ADDR $server_addr;

fastcgi_param SERVER_PORT $server_port;

fastcgi_param SERVER_NAME $server_name;

# PHP only, requiredif PHP was built with --enable-force-cgi-redirect

fastcgi_param REDIRECT_STATUS200;

}

location~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {

root/home/bae/app/public;

expires 30d;

access_log off;

}

location~ .*\.(js|css)?$ {

root/home/bae/app/public;

expires 7d;

access_log off;

}

location~ /\.ht {

root/home/bae/app/public;

deny all;

}

## 禁止敏感文件的直接访问

location~* \.(inc|bak|sql|lua|so|ini|conf)$ {

deny all;

}

更多推荐

百度云虚拟主机配置php.ini,百度云虚拟主机配置 Thinkphp5.1

本文发布于:2024-02-27 10:49:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1706254.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:虚拟主机   php   ini

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!