Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file extentions using apache web server

Status
Not open for further replies.

Styles137

IS-IT--Management
Sep 14, 2005
16
US

I need a little help here. I am using Fedora 3 for my server. There are multiple sites hosted on this box. I am having trouble with one of the sites where I am creating a powerpoint presentation on my computer, uploading the ppt to the server, and when I access this online, it turns to garbled text. Does anyone know if there is a quick fix to helping the server recognize certain file extentions? I am having the same problem with two other file extentions from a different program as well.
 
Hi

You must inform the web server about this new MIME type.

Put this in httpd.conf :
[tt]AddType application/x-powerpoint .ppt[/tt]

Or this in mime.types :
[tt]application/x-powerpoint .ppt[/tt]

Feherke.
 
That did work for powerpoint. This is not working for the program called Inspiration. I tried adding application/x-inspiration xxx where the x's are the file extention. After rebooting the server, powerpoint is working fine, but I can still not see inspiration files. Am I adding the line the correct way? what does the "application/x-" mean? am i adding this line the right way?
 
Hi

Styles137 said:
I tried adding application/x-inspiration xxx
Where ? In /etc/mime.types ?

application - usualy used for binary files
x- - prefix for officially not registered types

If you look at the HTTP headers, what content-type header is there ?
Code:
wget -S --spider [URL unfurl="true"]http://your.fedora3.server/the/inspiration.xxx[/URL]

Feherke.
 
Yes, I did add the application/x-inspiration xxx to the /etc/mime.types flie. This is the respone I got when I used the above command for my file.

HTTP request sent, awaiting response...
1 HTTP/1.1 404 Not Found
2 Date: Mon, 19 Sep 2005 11:34:55 GMT
3 Server: Apache/2.0.53 (Fedora)
4 Connection: close
5 Content-Type: text/html; charset=iso-8859-1
07:34:55 ERROR 404: Not Found.
 
Hi

Ok, but server says 404, so seems to be no such file on that server. What happens if you enter that URL in a browser ? Anyway, that /var/ path looks like a local filesystem path.

By the way, are you sure, the .ins extension is not associated with something else ? Perhaps a server parsed format.

Feherke.
 
I know the ins and isf file extentions are both associated with the inspiration program. I know the files are saved to that computer. when I do a find -name *.ins, I find a couple of the files that have been saved to that server. when I try to open them in a browser - it will not go into the var folder at all - it stops at xxx.xxx.org and will not go any deaper into the folders.
 
Hi

What is the [tt]DocumentRoot[/tt] setting in the httpd.conf ? Usualy only a smaller directory is published through HTTP, not the entire /. Sorry to ask again, are you the path is correct ?
Code:
[blue]master#[/blue] grep DocumentRoot /etc/httpd/conf/httpd.conf
DocumentRoot "/var/httpd/docs"

[blue]master#[/blue] ls -l /var/httpd/docs/stats/mostwanted.php 
-rw-r--r--  1 [URL unfurl="true"]www www[/URL] 2575 Jun 22  2004 /var/httpd/docs/stats/mostwanted.php

[blue]master#[/blue] wget -S --spider [URL unfurl="true"]http://localhost/var/httpd/docs/stats/mostwanted.php[/URL]
--09:39:34--  [URL unfurl="true"]http://localhost/var/httpd/docs/stats/mostwanted.php[/URL]
           => `mostwanted.php'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 404 Not Found
  Date: Tue, 20 Sep 2005 06:39:34 GMT
  Server: Apache (Unix)
  Content-Type: text/html; charset=ISO-8859-1
09:39:36 ERROR 404: Not Found.

[blue]master#[/blue] wget -S --spider [URL unfurl="true"]http://localhost/stats/mostwanted.php[/URL]
--09:39:45--  [URL unfurl="true"]http://localhost/stats/mostwanted.php[/URL]
           => `mostwanted.php'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Date: Tue, 20 Sep 2005 06:39:46 GMT
  Server: Apache (Unix)
  Content-Type: text/html; charset=ISO-8859-1
Length: unspecified [text/html]
200 OK

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top