Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple html page in which i am running video using html5 tags, when i run that page using firefox it runs the page and video properly. But when i run this page by setting the apache server using localhost it doesn't run. What could be the issue, what settings are required.

This is the path of my 'local-host' :


And the code of my index.html page is :

<img src="index.jpeg">

  <video controls preload="auto" loop>
        <source src="test.ogv" type="application/ogg; codecs="dirac, vorbis"" />
        <source src="test.mp4" type="video/mp4; codecs="avc1.42E01E, mp4a.40.2"" />


Should i have to set MIME type for apache server. I am new to linux so please give me code suggestions quickly.


share|improve this question

Try downloading the videos from the page source. I guess its a permission issue. You may need to change the file permission.

To do that, run this command in the folder: chmod 755 test.*

share|improve this answer
how to do that... – user121420 Feb 21 '13 at 7:34
i think i need to set mime type for apache server..when i run my html page directly with firefox, it plays the video. But when i play the page through apache server setting the page in /var/www folder it doesn't play. Means there is some setting to do with apache server. – user121420 Feb 21 '13 at 9:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.