-
Notifications
You must be signed in to change notification settings - Fork 976
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
sudo apt-get install libapache2-mod-xsendfile && sudo a2enmod 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 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
A blank page means is not working
Alternatively, If you have the SecureVideosDirectory plugin, you can test it like this