Skip to content

Moving videos directory and securing files from direct access to the video source file

YouPHPTube edited this page Nov 28, 2017 · 21 revisions

What we use for that:

  1. Ubunut 16
  2. Apache XSendFile
  3. SecureVideosDirectory Plugin

What will you need

  1. Root Access to the server

Install apache xsendfile

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

Configure your apache XSendFile

sudo nano /etc/apache2/apache2.conf

<Directory /home/daniel/Dropbox/htdocs/YouPHPTube/> Options Indexes FollowSymLinks XSendFile on XSendFilePath /var/www/html/YouPHPTube AllowOverride All Order Allow,Deny Allow from All </Directory>

Move your videos directory

sudo mv /home/daniel/Dropbox/htdocs/YouPHPTube/videos /home/daniel/Documentos/videos

Must create a symbolic link

sudo ln -s /home/daniel/Documentos/videos /home/daniel/Dropbox/htdocs/YouPHPTube/videos

Clone this wiki locally