LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-14-2006, 10:15 AM   #1
centosian
LQ Newbie
 
Registered: Jul 2005
Posts: 11

Rep: Reputation: 0
Apache2 displays html source only with 2.6 kernel


Alright, this is driving me nuts.

I did a fresh install of Apache2 (2.0.55), copied a test .html file to /var/www which is the document root directory, started the server and ran a quick test. When I access a page like http://localhost/index.html it just shows me the html source, i.e it just displays this in my Firefox browser(1.0.7).

Code:
<html>
<head>
  <title>Test page</title>
  </head>
  <body>
  <h1>This is a test page</h1>
  </body>
</html>
Same goes for any of the html files in /var/www/apache2-default.

I am running 2.6.12 with the testing(Etch) sources.list. This isn't a problem on my other machine running the 2.4 kernel with the same sources.list. How in the heck does 2.6 have anything to do with this?

I've tried apache2-mm-prefork and apache2-mm-worker and both have the same problem.

**Confused and frustrated.**

Thanks,
 
Old 01-14-2006, 10:30 AM   #2
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
It doesn't have anything to do with the kernel version. The HTML headers might help, post them here.

Adding the following to the configuration file might help:
Code:
AddType text/html .html
And then:
Code:
/etc/init.d/apache2 reload
 
Old 01-14-2006, 10:43 AM   #3
centosian
LQ Newbie
 
Registered: Jul 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Doh! Thank you, saman! That did it.

I just assumed(no wonder that's a dirty word) that a default installation would have the .html type handler already configured.

In fact on my 2.4 machine that's not in my apache2.conf file either but strangely enough it renders the html just fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
To find Tool in QT designer which displays HTML Contents kiranbud Linux - Software 0 11-24-2005 11:35 PM
Apache2 no index.html page babelbrennt Debian 1 11-10-2005 07:35 AM
Apache2, mod_perl2, HTML::Mason not finding Apache::Request2-2 Silent1 Linux - Software 3 04-30-2005 04:52 PM
My Apache2 fails to parse php-scripts in html pages 3-1415 Linux - Software 6 10-21-2004 05:59 AM
Apache displays html code tlmii Linux - Software 3 06-09-2004 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration