problem with playing mp4 file on apache hosted webpage

J

Jochem

Guest
Hi,

I hope someone could assist me.

My problem is: I want to achieve playing a mp4 file in webpage hosted by my apache2 server. Now I tried everything but he keeps giving me nothing.


First my php pages are located in default: /var/www

In each php page I build a litle piece of my complete path that I need to acces the mp4 file in my HTML 5 video tag.

Second my Video's are located in /media/disk1/Video

I also noticed on some blogs that u had to alter the apache2/sites-enabled/000-default file
The thing I added is written in red.
So i did like this


<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

<Directory /media/disk1/Video>
AllowOverride None
</Directory>


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.

LogLevel warn

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

------------------------------------------------------------------
and restarted my apache2

3de I Printed the complete path on the final php page to make sure I had formed the correct path, and this is the case.

I also made sure my mp4 files or path only contained alfabethic characters.

As last resort I tried to understand why my vids weren't played.
I went to my browser I tried to give the path in like this
http://192.168.0.136/media/disk1/Video/Series/Suits/SuitsS03E04.mp4

The result:
I got the error 404 not found...


I would be very glad if someone could share their insight on this problem.
 


When I alter my Documentroot to /media/disk1/Video

My browser prompts me 403 forbidden error...
 
When I alter my Documentroot to /media/disk1/Video

My browser prompts me 403 forbidden error...

I would first check the security settings for Apache and then the permissions for the file itself.

By the way, welcome to Linux.org!
 

Members online


Top