LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 12: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 12:41 AM.
 
Old 04-04-2012, 01:58 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
Do you get a 404 error? a permission denied error? Or simply not showing without error?
 
Old 04-04-2012, 03: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, 03:15 AM   #4
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
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, 03: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, 03:21 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

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, 03: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, 03:26 AM   #8
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
...on debian based distros it should be /var/log/apache2/error_log or similar
 
Old 04-04-2012, 03: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, 03:29 AM   #10
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
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 03:34 AM.
 
  


Reply



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 04:21 AM
Elinks Error: Unable to retrieve Web page. jpmaxyusuf Linux - Networking 1 07-19-2010 01:39 PM
Can ping web page from telnet, but can't open it in web browser a.ilic Linux - Networking 1 04-01-2008 10:29 AM
PNG file open mp4-10 Linux - Software 2 02-24-2005 02:20 PM
Unable to view web page from remote machine kiddy Linux - Networking 2 04-14-2004 09:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:54 PM.

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
Open Source Consulting | Domain Registration