第一步、部署 MACCMS10 系统
下载地址:https://github.com/magicblack/maccms_down
安装方法:类似于其他 PHP CMS 系统(这里不再赘述);
第二步、配置 Nginx 反向代理
使用如下 Nginx 配置(其中,webadmin.php 是 admin.php(由于安全原因 admin.php 被重命名))
server {
listen 80;
server_name videos.k4nz.com;
root /srv/maccms10/;
index index.php index.html index.htm;
location /asdfasdfasfdsafsfsafsadf {
rewrite ^(.*)$ /index.php?s=$1 last;
}
location / {
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^/webadmin.php(.*)$ /webadmin.php?s=$1 last;
rewrite ^/api.php(.*)$ /api.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
通过如下方法进行伪静态配置:
1)管理后台 / 系统 / URL 地址配置 / 路由伪静态设置 / 伪静态状态:开启
2)使用如下 Nginx 配置:
server {
listen 80;
server_name videos.k4nz.com;
root /srv/maccms10/;
index index.php index.html index.htm;
location /asdfasdfasfdsafsfsafsadf {
rewrite ^(.*)$ /index.php?s=$1 last;
}
location / {
if (!-e $request_filename) {
# 管理后台后台
rewrite ^/admin/(.*)$ /webadmin.php?s=/admin/$1 last;
# 对外接口
rewrite ^/provide/(.*)$ /api.php?s=/provide/$1 last;
# 页面显示
rewrite ^/index.php/(.*)$ /index.php?s=$1 last; # 修复在页面中的硬编码
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
第三步、添加采集站点
我们还需要设置“视频采集接口”,以从互联网采集各种视频;
打开后台地址,在采集 / 自定义资源中进行设置;
如下表格,是我们采集视频用到的站点(可能还有其他站点,日后将补充):
| 站点名称 | 主页 | 接口地址 | 接口类型 |
|---|---|---|---|
| 酷云资源网 | http://kuyunzy.vip/ | http://caiji.kuyunzyw.com/inc/s_ldg_kkyun.asp | XML |
| 永久资源网 | http://www.yongjiuzy.cc/ | http://cj.yongjiuzyw.com/inc/s_yjm3u8.php | XML |
| 最大资源网 | http://www.zuidazy4.com/ | ||
| 156 资源网 | http://www.156zy.cc/ |
注意事项
该系统只能采集视频信息,但是不能采集视频下载链接
常见问题汇总
对接微信公众号:苹果 CMS 搭建视频网站,定时采集视频
WIP 浏览模式非静态,无法生成
参考文献
7 Best Free / Open source Video CMS For Sharing Videos
搭建在线视频网站,怎么弄? – 知乎
零基础搭建影视站