RE: [users@httpd] HTML Documents Showing Up As Code Rather Than W eb Page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks to everyone. The after changing the DefaultType setting to text/html,
all browsers were able to bring up the files successfully. 

-----Original Message-----
From: Tim Burden [mailto:tim@xxxxxxxxx]
Sent: Thursday, March 10, 2005 12:52 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: [users@httpd] HTML Documents Showing Up As Code Rather Than
Web Page


No. If the server cannot determine the mime type it will use the default as
expressed by DefaultType
http://httpd.apache.org/docs-2.0/mod/core.html#defaulttype

This should be set to text/html

----- Original Message ----- 
From: "Kaplan, Andrew H." <AHKAPLAN@xxxxxxxxxxxx>
To: <users@xxxxxxxxxxxxxxxx>
Sent: Thursday, March 10, 2005 12:01 PM
Subject: RE: [users@httpd] HTML Documents Showing Up As Code Rather Than Web
Page


> I checked the mime.types.default file and the text/html line does
reference the
> extensions html and htm. My plan is to add the files with the html<date>
> extension
> to the list and see how that goes. Because the <date> is variable would
the
> correct
> syntax to add be html$DATE?
>
> If I were to add an AddType application line to the httpd.conf file, would
the
> syntax
> be AddType application/x-html .html$DATE
>
>
>
>
> -----Original Message-----
> From: Tim Burden [mailto:tim@xxxxxxxxx]
> Sent: Thu 3/10/2005 11:39 AM
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re: [users@httpd] HTML Documents Showing Up As Code Rather Than
Web
> Page
>
> So in one case you're using http, and in another case the browser is
reading
> the file directly from the file system and Apache is not involved. My
guess
> is that Boyle Owen was right, and there is a mime-type problem. In the
> latter case, the browser gets to decide what the mime type is because it
has
> no other hints. In the former case, the server is sending a mime-type (I'm
> guessing text/plain) that makes browsers think it is a plain text file. IE
> apparently doesn't care :)
>
> So, look at the default mime type and make sure it is text/html
>
>
> ----- Original Message ----- 
> From: "Kaplan, Andrew H." <AHKAPLAN@xxxxxxxxxxxx>
> To: <users@xxxxxxxxxxxxxxxx>
> Sent: Thursday, March 10, 2005 11:32 AM
> Subject: RE: [users@httpd] HTML Documents Showing Up As Code Rather Than
Web
> Page
>
>
> > Sorry about that ---
> >
> > When I enter the following text in the web browser's address field:
> >
> > http://<ip address>/outputfiles
> >
> > I get to the screen that lists the files in the directory which had
> > an alias configuration set up in the httpd.conf file. The files that
> > are listed have the following syntax:
> >
> > <outputfile>.html.<date> ie: scan1.html09-03-05
> >
> > When I click on the file it displays the source code of the file.
> >
> > However, if I enter the following text in the web browser's address
field:
> >
> > /home/admin/outputfiles
> >
> > I again get to the screen that lists the files in the directory. When I
> click
> > on the file it displays its information in html format.
> >
> > UPDATE --
> > I did some further investigating, and the problem that I described
> originally
> > appears to occur when using the Firefox, Opera, and Netscape web
browsers.
> > Internet Explorer does not appear to have this problem.
> >
> >
> > -----Original Message-----
> > From: Tim Burden [mailto:tim@xxxxxxxxx]
> > Sent: Thursday, March 10, 2005 11:24 AM
> > To: users@xxxxxxxxxxxxxxxx
> > Subject: Re: [users@httpd] HTML Documents Showing Up As Code Rather Than
> > Web Page
> >
> >
> > Eh? Are you doing some kind of redirect? You really need to give us some
> > more info about what the script does and how it's all put together. For
> > example, this:
> > "If I bring up the file using the /<directory path name> syntax, ie:
> > /home/<username>/outputfiles, the page comes up as it should." is
> completely
> > undecipherable.
> >
> > ----- Original Message ----- 
> > From: "Kaplan, Andrew H." <AHKAPLAN@xxxxxxxxxxxx>
> > To: "Apache User List (E-mail)" <users@xxxxxxxxxxxxxxxx>
> > Sent: Thursday, March 10, 2005 11:13 AM
> > Subject: FW: [users@httpd] HTML Documents Showing Up As Code Rather Than
> Web
> > Page
> >
> >
> > > UPDATE --
> > >
> > > I did some further investigating, and the problem that I described
> > originally
> > > appears to occur
> > > when using the Firefox, Opera, and Netscape web browsers. Internet
> > Explorer does
> > > not appear to
> > > have this problem.
> > >
> > > -----Original Message-----
> > > From: Kaplan, Andrew H.
> > > Sent: Thursday, March 10, 2005 8:48 AM
> > > To: Apache User List (E-mail)
> > > Subject: [users@httpd] HTML Documents Showing Up As Code Rather Than
Web
> > > Page
> > >
> > >
> > > Hi there --
> > >
> > > I am running a perl script that copies output in the form of an html
> page
> > to
> > > another directory and then removes the original file from the source
> > directory.
> > > When the file is copied to its new location a date stamp is appended
to
> > its
> > > name. For example <FILE1>.html would become <FILE1>.html<date>.
> > >
> > > When I bring up the file via a web browser using the URL/<directory
> alias>
> > > syntax, the file shows up as source code. If I bring up the file using
> > > the /<directory path name> syntax, ie: /home/<username>/outputfiles,
the
> > page
> > > comes up as it should. What could the problem here, and how do I
correct
> > it?
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server
> Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> > > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server
> Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> > > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > >
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> >    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> >    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> >
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux