-
Notifications
You must be signed in to change notification settings - Fork 1k
Moving videos directory and securing files from direct access to the video source file
YouPHPTube edited this page Nov 28, 2017
·
21 revisions
This tutorial shows you how to enable Apache XSendFile to prevent your videos from being accessed by external or unauthorized users. It will also help you set up the symbolic link to allow you to move your videos to another location
Get 1 hour support on our Services Site, we will do it for you
- Ubunut 16
- Apache XSendFile
- SecureVideosDirectory Plugin
- Root Access to the server
- Admin user for YouPHPTube
This is necessary for secure files and configuration assistant
sudo apt-get install libapache2-mod-xsendfile && sudo a2enmod xsendfile
sudo nano /etc/apache2/apache2.conf
<Directory /var/www/YouPHPTube/>
Options Indexes FollowSymLinks
XSendFile on
XSendFilePath /var/www/YouPHPTube/
AllowOverride All
Require all granted
Order Allow,Deny
Allow from All
</Directory>
sudo nano /var/www/YouPHPTube/.htaccess
<IfModule mod_xsendfile.c>
RewriteRule ^videos/([A-Za-z0-9-_.]+)$ view/xsendfile.php?file=$1 [NC,L]
</IfModule>
sudo mv /home/daniel/Dropbox/htdocs/YouPHPTube/videos /home/daniel/Documentos/videos
sudo ln -s /home/daniel/Documentos/videos /home/daniel/Dropbox/htdocs/YouPHPTube/videos
There is a Video, it is not public. The video source file is https://demo.youphptube.com/videos/_YPTuniqid_599cee25994a94.99095552.mp4, you will only be able to see the source file if you are logged in on demo site.
The Open Source Video Platform Solution
| Service | Description | Link |
|---|---|---|
| 🎯 | Professional Support - Direct assistance from core developers | Contact |
| ☁️ | AVideo CDN - High-performance video delivery network | Pricing |
AVideo Platform © 2024 - Self-hosted video streaming platform
Made with ❤️ by WWBN and the open source community