1 Star 0 Fork 0

local.clk/blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
clk528.com.conf 2.69 KB
一键复制 编辑 原始数据 按行查看 历史
local.clk 提交于 2017-12-13 09:59 +08:00 . Create clk528.com.conf
server{
listen 443;
server_name clk528.com www.clk528.com;
index index.html index.htm index.php;
root /your/path/public;
ssl on;
ssl_certificate pem/214171390160622.pem;
ssl_certificate_key pem/214171390160622.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
if ($http_user_agent ~* "bing.com" ) {
return 404;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /lua {
default_type 'text/html';
content_by_lua 'ngx.say("hello world")';
}
location ^~/blog/image-upload/{
rewrite ^(/blog/image-upload/)(.*)$ /../storage/upload/images/$2 last;
break;
}
location /resource/ {
rewrite (.*) /../$1 break;
}
add_header Access-Control-Allow-Origin https://www.clk528.com;
location ~ [^/]\.php(/|$){
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
set $path_info "";
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;
######################
#include fastcgi_params;
#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;
}
location /nginx_status {
stub_status on;
access_log off;
}
location ~* /chenlongke.txt{
return 404;
}
#location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
#{
# expires 30d;
#}
#location ~ .*\.(js|css)?$
#{
# expires 12h;
#}
access_log logs/clk528.com.log access;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/clk528/blog.git
git@gitee.com:clk528/blog.git
clk528
blog
blog
master

搜索帮助