- 博客(0)
- 资源 (5)
- 收藏
- 关注
thinkcmf适配的OSS直传插件
基于Thinkcmf,用于实现OSS直传,支持单图多图,百度富文本单图多图视频音频直传阿里云OSS存储服务。只需要简单配置即可轻松实现资源的云存储服务。如果配置业务域名请在nginx.conf文件中配置代理阿里云存储提供的域名。
以下是nginx vhost目录下的配置文件(tp5nginx配置请访问http://note.youdao.com/noteshare?id=a47a266fc4cdd0e1b00f23a938f84682)
server {
listen 80;
listen 443 ssl;
server_name img.example.com;
root /home/www/website/public;
index index.html index.htm index.php;
set $basedir "open_basedir=/home/www/website/:/tmp/:/proc/";
access_log /home/www/logs/website.access.log;
error_log /home/www/logs/website.error.log;
# ssl on;
ssl_certificate vhosts/ssl/ca.pem;
ssl_certificate_key vhosts/ssl/ca.key.unsecure;
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;
error_page 404 /404.html;
location = /404.html {
return 404 'Sorry, File not Found!';
}
location / {
root /home/www/website/public;
proxy_pass https://imgbucket.oss-cn-beijing.aliyuncs.com/;
proxy_set_header Referer https://img.example.com;
}
location ~ /\.ht {
deny all;
}
}
2018-12-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人