搭建属于自己的影视网站

前言

看着别人有自己的视频网站很稀奇,所以自己闲暇时间也搞了一个。练练手。
使用技术如下:

  • Nginx
  • PHP
  • MYSQL

苹果CMS

首先去苹果CMS网站下载

下载完成将压缩包里面的内容上传到自己服务器,自己定义一个文件夹即可。我是把压缩包内容都上传到了video文件夹下了。

修改nginx配置

将自己的服务器域名或者想要指定的端口配置上,转发到video目录下。

server
{
  listen 80; 
  server_name 自己的域名或者ip;
  root  /var/www/video; 
  index index.php index.html;

  if (!-e $request_filename) {
    rewrite ^/index.php(.*)$ /index.php?s=$1 last;
    rewrite ^/admin.php(.*)$ /admin.php?s=$1 last;
    rewrite ^/api.php(.*)$ /api.php?s=$1 last;
    rewrite ^(.*)$ /index.php?s=$1 last;
    break;
  }
  location ~ .php {
    fastcgi_pass php-fpm;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
  location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
    expires 30d;
    access_log off;
  }
  location ~ .*\.(js|css)?$ {
    expires 7d;
    access_log off;
  }
  location ~ /\.ht {
    deny all;
  }
}

重启nginx。然后输入域名端口进行安装和指定数据库即可。

最后

其余的找影视网站模板,或者采集资源可以自行百度。这都不是技术问题了,不再记录了。

猜你喜欢

转载自blog.csdn.net/gfl1427097103/article/details/119514357
今日推荐