View Project

FlixBox

FlixBox is an easy to use movie/show platform to easily find and cast your DVDs

Installation

FFMpeg

sudo apt install ffmpeg -y

MongoDB

Please use this link to install MongoDB MongoDB

PHP & Apache Install

PHP Version should be atleast 8.1

sudo apt install apache2 -y
sudo apt install php libapache2-mod-php -y
sudo apt install php-fpm -y
sudo apt install ffmpeg -y

How to Install

Here are the command you will need to do:

cd /var/www
sudo chmod -R 777 /var/www/
git clone https://[email protected]/DrBrad/FlixBox.git
mv FlixBox flixbox

Creating the endpoints

[!NOTE]
Make sure to do this for admin, api, web, and media. This example is for just the web.

HTTP Side

sudo nano /etc/apache2/sites-available/flixbox.conf
<VirtualHost *:80>
        ServerName flixbox.tv
        ServerAlias www.flixbox.tv

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/flixbox/web
        ProxyErrorOverride On

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

HTTPS Side

sudo nano /etc/apache2/sites-available/flixbox_ssl.conf
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerName flixbox.tv
                ServerAlias www.flixbox.tv

                ServerAdmin webmaster@localhost
                DocumentRoot /var/www/flixbox/web
                ProxyErrorOverride On

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                SSLEngine on
                SSLCertificateFile      /etc/ssl/certs/flixbox.crt
                SSLCertificateKeyFile /etc/ssl/private/flixbox.key

                <FilesMatch "\.(?:cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>
        </VirtualHost>
</IfModule>

Enable the configs

sudo a2ensite flixbox.conf
sudo a2ensite flixbox_ssl.conf

More Libraries

sudo a2enmod rewrite
sudo a2enmod expires

sudo apt install php8.1 libapache2-mod-php8.1 php8.1-cli php8.1-mongodb php8.1-common php8.1-imap php8.1-redis php8.1-snmp php8.1-xml php8.1-zip php8.1-mbstring php8.1-cgi php8.1-curl php8.1-gd -y

sudo a2enmod ssl
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/flixbox.key -out /etc/ssl/certs/flixbox.crt
sudo apache2ctl -t

sudo a2dismod php8.1
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event proxy_fcgi setenvif
sudo a2enconf php8.1-fpm

sudo chmod -R 777 /var/www/

Apache Config

sudo nano /etc/apache2/apache2.conf 
<Directory /var/www/>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

Composer Install

Use this link to install Composer Composer

cd /var/www/flixbox
composer require mongodb/mongodb --ignore-platform-reqs
composer require jenssegers/mongodb --ignore-platform-reqs
composer require php-ffmpeg/php-ffmpeg --ignore-platform-reqs
composer require phpmailer/phpmailer --ignore-platform-reqs

PHP INI Config

sudo nano /etc/php/8.1/fpm/php.ini

Make sure to set these

max_execution_time = -1
post_max_size = 500G
upload_max_filesize = 500G
max_file_uploads = 2000

extension=curl
extension=gd
extension=mbstring

Restart

Make sure to restart

sudo apt update
sudo service apache2 restart

[!WARNING] Site will give 500 Error if their is no data.

Sample DB

This is how you can set our sample DB to not get a 500 Error.

mongorestore -d flixbox /home/USER/dump

Configuration

[!WARNING] Changing any of the keys after users have subscribed will make you unable to send push notifications.

Scripts

Here are some scripts to help you get videos in the right format in the case that you don't want your server converting videos or audio. FlixBox Scripts

Languages

Languages used: PHP JavaScript CSS ActionScript ActionScript