Skip to content

Install Apache XSendFIle

Daniel Neto edited this page Apr 20, 2022 · 8 revisions

This is mandatory when you want to control access to your video files

Install apache xsendfile

sudo apt-get install libapache2-mod-xsendfile && sudo a2enmod xsendfile

Configure your apache XSendFile

sudo nano /etc/apache2/apache2.conf

or in your virtual hosts

sudo nano /etc/apache2/sites-available/youphptube.conf
sudo nano /etc/apache2/sites-available/youphptube-le-ssl.conf

Edit the file and add this

<Directory /var/www/html/AVideo/>
    Options Indexes FollowSymLinks
    XSendFile on
    XSendFilePath /var/www/html/AVideo/
    AllowOverride All
    Require all granted
    Order Allow,Deny
    Allow from All
</Directory>

Reload apache and you are done

systemctl reload apache2

Test if it is installed correctly

Test this URL https://yourdomain.com/videos/test.mp4

If it is working you should see something like this https://demo.avideo.com/videos/test.mp4

image

A blank page means is not working

Alternatively, If you have the SecureVideosDirectory plugin, you can test it like this

chrome-capture

Clone this wiki locally