Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed ubuntu server on my system, after installation, I also installed lamp server.

However, the problem is : i created a empty folder in var/www, the folder directory is var/www/mobile. I visited the URL localhost/mobile and it was working but the folder was empty. Then I added an HTML file in the mobile directory - var/www/index.html. I used vi var/www/index.html to create the file.

After adding the index.html in var/www . I visited again localhost/mobile but now the computer is treating the directory as a downlodable file. Each time I visit the URL the web-browser is asking me to save the directory. I tried on the iPod and this massage came out " cannot download the file".

share|improve this question

1 Answer 1

Does it happen on all browsers? You could have a problem with the default MIME type. Let's learn what the browser sees. Install Firefox Web browser, and then the Firefox extension, Live HTTP Headers. Now, what MIME type or Content-Type was sent to the browser? You will see many headers, but the important one now is Content-Type. For XHTML you might see these among others...

HTTP/1.1 200 OK
Date: Sun, 25 Dec 2011 19:48:00 GMT
Server: Apache/2
Content-Length: 750
Content-Style-Type: text/css
Content-Type: application/xhtml+xml

Now look at your Apache config files, specifically the AddHandler and AddType directives. The default type is text/html. What is your Apache using?

share|improve this answer

Your Answer

 
discard

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.