一键 caddy php h5ai_H5ai 在线播放搭建

apeche2部署

1 准备系统环境

应该对操作系统没什么要求,任何发行版的 linux 和 windows 都行,只要可以运行 apache 就可以。我用的是 ubuntu14.04.

2 搭建环境

sudo apt-get install apache2

sudo apt-get install php7.2 libapache2-mod-php7.2 php7.2-curl

wget https://release.larsjung.de/h5ai/h5ai-0.29.0.zip

unzip h5ai-0.29.0.zip

cp -r _h5ai /var/www/html/

apt-get install php5-gd

sudo service apache2 restart

如果出现php安装问题,可以参考

# apt-get update

# apt-get upgrade

# apt-get install

这样就可以正常使用apt-get了~

3 检查是否安装正确

首先会看到登录界面,如下图所示。初始密码为空,可以在 _h5ai/private/conf/options.json 中修改密码

acme.sh --issue -d hufan.me --apache

acme.sh --installcert -d hufan.me

--cert-file /etc/apache2/ssl/cert.pem

--key-file /etc/apache2/ssl/key.pem

--fullchain-file /etc/apache2/ssl/fullchain.pem

--reloadcmd "service apache2 force-reload"

SSLCertificateFile /etc/apache2/ssl/cert.pem

SSLCertificateKeyFile /etc/apache2/ssl/key.pem

SSLCertificateChainFile /etc/apache2/ssl/fullchain.pem

caddy部署(推荐)

我的部署结果:

proxy.hufan.me {

gzip

timeouts none

root /var/www/html

browse

proxy /avewqs 127.0.0.1:38932 {

without /avewqs

websocket

}

}

https://hufan.me {

gzip

root /var/www/html

# 启用php

fastcgi / /run/php/php7.0-fpm.sock php

# Caddy 链接重写规则:

rewrite {

if {path} ends_with /

to {dir}/index.html {dir}/index.php /_h5ai/public/index.php

}

}

# 重定向

http://hufan.me {

timeouts none

redir https://hufan.me

}

import sites/*

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值