首先安装 docker,参考这里
然后运行下面的命令
bash
mkdir log
mkdir conf
mkdir cms
docker run -d --restart=always --name nginx -p 80:80 -p 443:443 -v 自定义路径:自定义路径 -v ./conf:/etc/nginx/nginx.conf -v ./conf/conf.d:/etc/nginx/conf.d -v ./certs:/etc/nginx/certs -v ./cms:/var/www/html -v ./log/nginx:/var/log/nginx --link php:php nginx:alpine
docker run -d --restart=always --name php -v 自定义路径:自定义路径 -v ./cms:/var/www/html kimoqi/php-fpm-all-ext:7.3
docker run -d --name mysql --restart=always -v 自定义路径:自定义路径 -p 自定义端口:3306 -e MYSQL_ROOT_PASSWORD=自定义密码 -e MYSQL_USER=自定义用户名 -e MYSQL_DATABASE=自定义数据库名 mysql:5.7
|
自行配置证书放到 certs
bash
curl https://get.acme.sh | sh
~/.acme.sh/acme.sh --register-account -m xxxx@gmail.com
~/.acme.sh/acme.sh --issue -d 自定义域名 --standalone
~/.acme.sh/acme.sh --installcert -d 自定义域名 --key-file certs/key.pem --fullchain-file certs/cert.pem
|
编写 nginx 配置文件
bash
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 1000m;
#上传限制参数1G以内文件可上传
# HTTP server
server {
listen 80;
server_name 自定义域名;
# Redirect all HTTP requests to HTTPS
return 301 https://$host$request_uri;
}
# HTTPS server
server {
listen 443 ssl http2;
server_name 自定义域名;
# http2 on;
ssl_certificate /etc/nginx/certs/cert.pem;
ssl_certificate_key /etc/nginx/certs/key.pem;
root /var/www/html/apple;
index index.php;
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^/vip.php(.*)$ /vip.php?s=$1 last;
rewrite ^/api.php(.*)$ /api.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
try_files $uri $uri/ =404;
# PHP-FPM configuration
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
|
下载源码
bash
mkdir cms/apple
wget https://github.com/magicblack/maccms_down/raw/master/maccms10.zip && apt-get install -y unzip && unzip maccms10.zip && rm maccms10.zip
mv maccms10-master/* cms/apple
|
下载主题
bash
cd apple/template/
wget https://github.com/kejilion/Website_source_code/raw/main/DYXS2.zip&& unzip DYXS2.zip && rm DYXS2.zip
|
配置主题
bash
cd
cp cms/apple/template/DYXS2/asset/admin/Dyxs2.php cms/apple/application/admin/controller
cp cms/apple/template/DYXS2/asset/admin/dycms.html cms/apple/application/admin/view/system
|
修改登陆文件
bash
mv cms/apple/admin.php cms/apple/vip.php
|
赋予权限
bash
docker exec -it php chmod -R 777 /var/www/html
docker exec -it nginx chmod -R 777 /var/www/html
chmod -R 777 cms
|
重启 nginx
bash
打开 https:// 域名 /install.php 按提示安装苹果 cms
进入首页 —— 自定义菜单配置,输入下面文字保存
电影先生 2.0,/vip.php/admin/Dyxs2/dyxs2set
接下来安装超级播放器超级播放器并上传到服务器 cms/play 下,nginx 配置文件
bash
# HTTPS server
server {
listen 443 ssl http2;
server_name 自定义域名不能和第一个相同;
# http2 on;
ssl_certificate /etc/nginx/certs/cert.pem;
ssl_certificate_key /etc/nginx/certs/key.pem;
root /var/www/html/play/public;
index index.php;
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
try_files $uri $uri/ =404;
# PHP-FPM configuration
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
|
赋予权限
bash
打开 https:// 域名 / 安装,按照文件自带文档配置
解析接口配置为 https:// 域名 /player/index.php?code = 播放器编码 & if=1&url=
下载萌兔采集插件
bash
cd cms/apple
wget
https://www.mycj.pro/upload/%E8%90%8C%E8%8A%BD%E9%87%87%E9%9B%86%E6%8F%92%E4%BB%B6Pro%20v10.7.3.zip && unzip '萌芽采集插件Pro v10.7.3.zip' && rm '萌芽采集插件Pro v10.7.3.zip'
docker exec -it php chmod -R 777 /var/www/html
docker exec -it nginx chmod -R 777 /var/www/html
chmod -R 777 cms
|
在后台 点击应用 —— 应用市场,找到萌芽插件点击启用,刷新后可在首页左下角找到萌芽采集资源,点击绑定分类,可自动设置分类,点击播放配置修改成 https:// 域名 /player/index.php?code = 播放器编码 & if=1&url=
点击采集内容
最后大功告成
记得屏蔽进行 IP 限制
评论区