撰于 阅读 24

安装playtube

和普通的开源程序一样安装

下载:https://pan.baidu.com/s/1NfHvY2j4LQiLV_Vtd9aYQQ 提取码:ftb5

Nginx伪静态:

nginxlocation / {
  if (!-e $request_filename){
    rewrite ^/$ /index.php?link1=home;
  }
  if (!-e $request_filename){
    rewrite ^/aj/([^/.]+)/?$ /ajax.php?type=$1&first=$2;
    rewrite ^/aj/([^/.]+)/([^/.]+)/?$ /ajax.php?type=$1&first=$2;
    rewrite ^/aj/([^/.]+)/([^/.]+)/([^/.]+)/?$ /ajax.php?type=$1&first=$2&second=$3;
  }
  rewrite ^/@([^\/]+)(\/|)$ /index.php?link1=timeline&id=$1;
  if (!-e $request_filename){
    rewrite ^/([^\/]+)(\/|)$ /index.php?link1=$1;
  }}location /reset {
  rewrite ^/reset-password/([^\/]+)(\/|)$ /index.php?link1=reset-password&code=$1;}location /confirm {
  rewrite ^/confirm/(.*)/(.*)$ /index.php?link1=confirm&code=$1&email=$2;}location /api {
  rewrite ^/api/v(([0-9])([.][0-9]+))(\/|)$ /api.php?v=$1;}location /admin {
  rewrite ^/admin-cp$ /admincp.php;
  rewrite ^/admin-cp/(.*)$ /admincp.php?page=$1;}location /admin-cdn/ {
  alias /admin-panel/;}location /videos {
  rewrite ^/videos/category/(.*)/rss(\/|)$ /index.php?link1=videos&page=category&id=$1&feed=rss;
  rewrite ^/videos/category/(.*)$ /index.php?link1=videos&page=category&id=$1;
  rewrite ^/videos/(.*)/rss(\/|)$ /index.php?link1=videos&page=$1&feed=rss;
  rewrite ^/videos/(.*)$ /index.php?link1=videos&page=$1;}location /articles {
  rewrite ^/articles(\/|)$ /index.php?link1=articles;
  rewrite ^/articles/category/(\d+)(\/|)$ /index.php?link1=articles&category_id=$1;
  rewrite ^/articles/read/(.*)(\/|)$ /index.php?link1=read&id=$1;}location /edit {
  rewrite ^/edit-video/(.*)?$ /index.php?link1=edit-video&id=$1;}location /watch {
  rewrite ^/watch/([^\/]+)(\/|)?$ /index.php?link1=watch&id=$1;
  rewrite ^/watch/([^\/]+)/list/([^\/]+)(\/|)?$ /index.php?link1=watch&id=$1&list=$2;}location /embed {
  rewrite ^/embed/(.*)?$ /index.php?link1=embed&id=$1;}location /resend {
  rewrite ^/resend/(.*)/(.*)?$ /index.php?link1=resend&id=$1&u_id=$2;}location /redirect {
  rewrite ^/redirect/(.*)?$ /index.php?link1=redirect&id=$1;}location /settings {
  rewrite ^/settings/(.*)/(.*)$ /index.php?link1=settings&page=$1&user=$2;
  rewrite ^/settings/(.*)$ /index.php?link1=settings&page=$1;}location /terms {
  rewrite ^/terms/([^\/]+)(\/|)$ /index.php?link1=terms&type=$1;}location /go_pro {
  rewrite ^/go_pro(\/|)$ /index.php?link1=go_pro;}location /ads {
  rewrite ^/ads(\/|)$ /index.php?link1=ads;
  rewrite ^/ads/create(\/|)$ /index.php?link1=create_ads;
  rewrite ^/ads/edit/(\d+)(\/|)$ /index.php?link1=edit_ads&id=$1;}location /contact {
  rewrite ^/contact-us(\/|)$ /index.php?link1=contact;}

 

Apache伪静态:

ApacheRewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^$ index.php?link1=home [NC,QSA]
RewriteRule ^reset-password/([^\/]+)(\/|)$ index.php?link1=reset-password&code=$1 [NC,QSA]
RewriteRule ^confirm/(.*)/(.*)$ index.php?link1=confirm&code=$1&email=$2 [NC,QSA]
RewriteRule ^api/v(([0-9])([.][0-9]+))(\/|)$ api.php?v=$1 [QSA]
RewriteRule ^admin-cp$ admincp.php [NC,QSA]
RewriteRule ^admin-cp/(.*)$ admincp.php?page=$1 [NC,QSA]
RewriteRule ^admin-cdn/(.*)$ admin-panel/$1 [L]
RewriteRule ^videos/category/(.*)/rss(\/|)$ index.php?link1=videos&page=category&id=$1&feed=rss [NC,QSA]
RewriteRule ^videos/category/(.*)$ index.php?link1=videos&page=category&id=$1 [NC,QSA]
RewriteRule ^videos/(.*)/rss(\/|)$ index.php?link1=videos&page=$1&feed=rss [NC,QSA]
RewriteRule ^videos/(.*)$ index.php?link1=videos&page=$1 [NC,QSA]
RewriteRule ^articles(\/|)$ index.php?link1=articles [NC,QSA]
RewriteRule ^articles/category/(\d+)(\/|)$ index.php?link1=articles&category_id=$1 [NC,QSA]
RewriteRule ^articles/read/(.*)(\/|)$ index.php?link1=read&id=$1 [NC,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^aj/([^/.]+)/?$ ajax.php?type=$1&first=$2 [L,QSA]
RewriteRule ^aj/([^/.]+)/([^/.]+)/?$ ajax.php?type=$1&first=$2 [L,QSA]
RewriteRule ^aj/([^/.]+)/([^/.]+)/([^/.]+)/?$ ajax.php?type=$1&first=$2&second=$3 [L,QSA]
RewriteRule ^edit-video/(.*)?$ index.php?link1=edit-video&id=$1 [L,QSA]
RewriteRule ^watch/([^\/]+)(\/|)?$ index.php?link1=watch&id=$1 [L,QSA]
RewriteRule ^watch/([^\/]+)/list/([^\/]+)(\/|)?$ index.php?link1=watch&id=$1&list=$2 [L,QSA]
RewriteRule ^embed/(.*)?$ index.php?link1=embed&id=$1 [L,QSA]
RewriteRule ^resend/(.*)/(.*)?$ index.php?link1=resend&id=$1&u_id=$2 [L,QSA]
RewriteRule ^redirect/(.*)?$ index.php?link1=redirect&id=$1 [L,QSA]
RewriteRule ^settings/(.*)/(.*)$ index.php?link1=settings&page=$1&user=$2 [NC,QSA]
RewriteRule ^settings/(.*)$ index.php?link1=settings&page=$1 [NC,QSA]
RewriteRule ^terms/([^\/]+)(\/|)$  index.php?link1=terms&type=$1 [QSA]
RewriteRule ^go_pro(\/|)$  index.php?link1=go_pro [QSA]
RewriteRule ^ads(\/|)$  index.php?link1=ads [QSA]
RewriteRule ^ads/create(\/|)$  index.php?link1=create_ads [QSA]
RewriteRule ^ads/edit/(\d+)(\/|)$  index.php?link1=edit_ads&id=$1 [QSA]
RewriteRule ^contact-us(\/|)$  index.php?link1=contact [QSA]
RewriteRule ^@([^\/]+)(\/|)$  index.php?link1=timeline&id=$1 [QSA]
RewriteRule ^messages/(.*)$ index.php?link1=messages&id=$1 [NC,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\/]+)(\/|)$  index.php?link1=$1 [QSA]

 

启用shell_exec函数

支持上传更多视频格式:
安装fmpeg
#x86下载二进制文件
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-32bit-static.tar.xz
#x86_64下载二进制文件
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz
#解压文件
tar xvf ffmpeg-git-*-static.tar.xz && rm -rf ffmpeg-git-*-static.tar.xz
#将ffmpeg和ffprobe可执行文件移至/usr/bin方便系统直接调用
mv ffmpeg-git-*/ffmpeg  ffmpeg-git-*/ffprobe /usr/bin/
#查看版本
ffmpeg
ffprobe

 


仅有一条评论

  1. Aly Chiman

    Hello there,

    My name is Aly and I would like to know if you would have any interest to have your website here at pao.ge promoted as a resource on our blog alychidesign.com ?

    We are in the midst of updating our broken link resources to include current and up to date resources for our readers. Our resource links are manually approved allowing us to mark a link as a do-follow link as well
    .
    If you may be interested please in being included as a resource on our blog, please let me know.

    Thanks,
    Aly

    回复