LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2012, 01:18 AM   #1
nagabhushan
LQ Newbie
 
Registered: Mar 2012
Posts: 16

Rep: Reputation: 0
unable to open png file on web page


Hi folks,

i was trying to display png image on browser from a linux server. My httpd configuration seems fine.i have same image on /var/www/html and /var/www/cgi-bin paths.
when i try to open this image from browser by using http://serverIp/filename.png its opening, but when i try http://serverIp/cgi-bin/filename.png its not opening.

Please explain.........

Last edited by nagabhushan; 04-04-2012 at 01:41 AM.
 
Old 04-04-2012, 02:58 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
Do you get a 404 error? a permission denied error? Or simply not showing without error?
 
Old 04-04-2012, 04:08 AM   #3
nagabhushan
LQ Newbie
 
Registered: Mar 2012
Posts: 16

Original Poster
Rep: Reputation: 0
i used to get the following error -

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@192.168.101.19 and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2.3 (Red Hat) Server at 192.168.101.19 Port 80
 
Old 04-04-2012, 04:15 AM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
Quote:
More information about this error may be available in the server error log.
Did you take a look at that?
 
Old 04-04-2012, 04:18 AM   #5
nagabhushan
LQ Newbie
 
Registered: Mar 2012
Posts: 16

Original Poster
Rep: Reputation: 0
where i have to check ?? in /var/log/messages i m not able to find anything related to this....
 
Old 04-04-2012, 04:21 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Your apache logs location depend on the distribution you use but assuming that you are using some RH based, it should be under /var/log/httpd/
 
Old 04-04-2012, 04:25 AM   #7
nagabhushan
LQ Newbie
 
Registered: Mar 2012
Posts: 16

Original Poster
Rep: Reputation: 0
i checked there... i m getting
[Wed Apr 04 13:45:10 2012] [error] [client 132.1.16.1] (8)Exec format error: exec of '/var/www/cgi-bin/shared-demo1.png' failed
[Wed Apr 04 13:45:10 2012] [error] [client 132.1.16.1] Premature end of script headers: shared-demo1.png
[Wed Apr 04 13:45:11 2012] [error] [client 132.1.16.1] File does not exist: /var/www/html/favicon.ico
[Wed Apr 04 13:45:12 2012] [error] [client 132.1.16.1] File does not exist: /var/www/html/favicon.ico
[Wed Apr 04 13:45:12 2012] [error] [client 132.1.16.1] File does not exist: /var/www/html/favicon.ico
[Wed Apr 04 13:45:13 2012] [error] [client 132.1.16.1] File does not exist: /var/www/html/favicon.ico
[Wed Apr 04 13:45:23 2012] [error] [client 132.1.16.1] File does not exist: /var/www/html/favicon.ico
 
Old 04-04-2012, 04:26 AM   #8
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
...on debian based distros it should be /var/log/apache2/error_log or similar
 
Old 04-04-2012, 04:27 AM   #9
nagabhushan
LQ Newbie
 
Registered: Mar 2012
Posts: 16

Original Poster
Rep: Reputation: 0
i got that... i already pasted that above... please check
 
Old 04-04-2012, 04:29 AM   #10
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
Seems you have to embed your image in a cgi script to let it show from there. CGI stands for Common Gateway Interface. The cgi-bin is rather a location for scripts...
Maybe you can configure the directory to serve images as well but I don't know.

But you can easily write a perl or python script that embeds the image in html

Last edited by j-ray; 04-04-2012 at 04:34 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
On the web browser and File>Save As>Web Page, HTML only. stf92 Linux - Newbie 4 12-18-2010 05:21 AM
Elinks Error: Unable to retrieve Web page. jpmaxyusuf Linux - Networking 1 07-19-2010 02:39 PM
Can ping web page from telnet, but can't open it in web browser a.ilic Linux - Networking 1 04-01-2008 11:29 AM
PNG file open mp4-10 Linux - Software 2 02-24-2005 03:20 PM
Unable to view web page from remote machine kiddy Linux - Networking 2 04-14-2004 10:06 PM


All times are GMT -5. The time now is 07:18 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration