[Techtalk] configuring Apache2 for pdf

Dennis Wheeler dennisw at vidiator.com
Thu Jun 10 21:00:25 EST 2004


or maybe it's just a file permissions problem on your server
 
be sure your pdf files are chmod 644

	-----Original Message----- 
	From: Cynthia Kiser [mailto:cnk at ugcs.caltech.edu] 
	Sent: Thu 6/10/2004 3:52 PM 
	To: Helen Rosseau 
	Cc: techtalk at linuxchix.org 
	Subject: Re: [Techtalk] configuring Apache2 for pdf
	
	

	Quoting Helen Rosseau <hrosseau at rogers.com>:
	> This is what I get as a result from your suggestion
	>
	> susebox:/opt/mozilla/lib # wget -S http://www.blackburnhamlet.ca/juno4/pg1.pdf
	> --15:34:10--  http://www.blackburnhamlet.ca/juno4/pg1.pdf
	>            => `pg1.pdf'
	> Resolving www.blackburnhamlet.ca... done.
	> Connecting to www.blackburnhamlet.ca[69.198.158.16]:80... connected.
	> HTTP request sent, awaiting response...
	>  1 HTTP/1.1 404 Not Found
	>  2 Date: Thu, 10 Jun 2004 19:28:33 GMT
	>  3 Server: Apache/2.0.47 (Linux/SuSE)
	>  4 Vary: accept-language,accept-charset
	>  5 Accept-Ranges: bytes
	>  6 Connection: close
	>  7 Content-Type: text/html; charset=iso-8859-1
	>  8 Content-Language: en
	>  9 Expires: Thu, 10 Jun 2004 19:28:33 GMT
	> 15:34:10 ERROR 404: Not Found.
	
	Well a 404 error is not good - the url is bad. Please try a working
	url. When you do, look at the Content-Type: line. The example above
	says "text/html". If your apache is properly configured AND asked for
	an actual pdf, then the mime type should be "application/pdf"/. Here
	is a working example (though the astute among you will notice, not
	from an Apache server):
	
	$ wget -S http://www.caltech.edu/map/map-dir-5-01.pdf
	--15:50:29--  http://www.caltech.edu/map/map-dir-5-01.pdf
	           => `map-dir-5-01.pdf'
	Resolving www.caltech.edu... done.
	Connecting to www.caltech.edu[131.215.220.4]:80... connected.
	HTTP request sent, awaiting response... 
	 1 HTTP/1.0 200 OK
	 2 Set-Cookie: ad_browser_id=39360153; Path=/; Expires=Fri,
	01-Jan-2010 01:00:00 GMT
	 3 Set-Cookie: ad_session_id=39360154%2c0%2cF844FDC53F033932AB3C85CD221B594F286E5F88%2c1086907829;
	Path=/; Max-Age=86400
	 4 Last-Modified: Sat, 28 Sep 2002 20:08:22 GMT
	 5 MIME-Version: 1.0
	 6 Date: Thu, 10 Jun 2004 22:50:29 GMT
	 7 Server: AOLserver/3.3.1+ad13
	 8 Content-Type: application/pdf
	 9 Content-Length: 11803
	10 Connection: keep-alive
	
	    0K .......... .                                          100%
	523.93 KB/s
	
	15:50:29 (523.93 KB/s) - `map-dir-5-01.pdf' saved [11803/11803]
	
	In your httpd.conf file there should be a line like this one from my
	apache 2.? install:
	
	   TypesConfig etc/apache/mime.types
	
	When you look in the mime.types file, you should see a line that maps
	the extension pdf to the mime type. Like this:
	
	   application/pdf                 pdf
	
	
	--
	Cynthia N. Kiser
	cnk at ugcs.caltech.edu
	



More information about the Techtalk mailing list