logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: [SOLVED] server not serving html
Author
SxN



Joined: 17 Mar 2014
Posts: 5
Location: Canada

PostPosted: Tue 18 Mar '14 15:27    Post subject: [SOLVED] server not serving html Reply with quote

Hi All,

On a newly installed 2.4 on a fresh Gentoo, I created the following test index.html file

Code:
<html><body>Hello</body></html>


The browser shows exactly that! Tags and all! I checked with Firebug on a Windows machine what is delivered, and here is what I found:

Code:
<html>
<head>
<link title="Wrap Long Lines" href="resource://gre-resources/plaintext.css" type="text/css" rel="alternate stylesheet">
</head>
<body>
<pre><html><body>Hello</body></html> </pre>
</body>
</html>


My code is surrounded by <pre>, like if the MIME type is text/text, not text/html.

What am I doing wrong?

Thanks,
SxN


Last edited by SxN on Wed 19 Mar '14 18:22; edited 1 time in total
Back to top
SxN



Joined: 17 Mar 2014
Posts: 5
Location: Canada

PostPosted: Wed 19 Mar '14 4:37    Post subject: Reply with quote

I created a little .htaccess beside index.html, with the following content:
Code:
AddHandler text/html .html

Trying now to access index.html, I got a 500 Internal Server Error (in the form of an HTML source code). A quick check in log gives this:
Code:
Invalid command 'AddHandler', perhaps misspelled or defined by a module not included in the server configuration.

Well, httpd.conf has this line:
Code:
LoadModule mime_module modules/mod_mime.so


Earlier I tried to use AddType instead of AddHandler, with the same results.

Bogs my mind, what may be going on?

Thanks,
SxN


Last edited by SxN on Wed 19 Mar '14 18:21; edited 1 time in total
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 19 Mar '14 13:11    Post subject: Reply with quote

Use AddType not AddHandler
Back to top
SxN



Joined: 17 Mar 2014
Posts: 5
Location: Canada

PostPosted: Wed 19 Mar '14 18:21    Post subject: Reply with quote

Neither AddType nor AddHandler worked. Anyway, I deleted Apache (emerge --unmerge in Gentoo), downloaded the latest from www.apache.org, installed and... voila! Works perfectly!

SxN
Back to top


Reply to topic   Topic: [SOLVED] server not serving html View previous topic :: View next topic
Post new topic   Forum Index -> Apache