LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2005, 09:03 AM   #1
Dapernia
LQ Newbie
 
Registered: Jul 2003
Location: Merida - Venezuela
Distribution: Ubuntu 7.04
Posts: 14

Rep: Reputation: 0
Smile Apache Web Server


Hi friends!:

I`ve installed Apache web server on my computer with Red Hat 9, and it works just fine on Linux, but I have two problems:

- The first one, is is when i try to access a web page from other computer with windows XP in the same network. I execute the ping command from windows computer and the linux host answers fine, but i can`t see any page.

- The other problem is when i try to execute cgi programs. The browser writes "500 internal error"... I have a compiled cgi script with "C" commands but it doesn´t work. Not even scripts written in Perl work.

I thought it was because it didn`t have Perl or C compiler installed on the computer but it looks like it has them.
Can anyone help me out please?

Thanks!!!

 
Old 01-23-2005, 12:15 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Re: Apache Web Server

Quote:
Originally posted by Dapernia
I`ve installed Apache web server on my computer with Red Hat 9, and it works just fine on Linux, but I have two problems:

- The first one, is is when i try to access a web page from other computer with windows XP in the same network. I execute the ping command from windows computer and the linux host answers fine, but i can`t see any page.
What error do you get?
Quote:
Originally posted by Dapernia
- The other problem is when i try to execute cgi programs. The browser writes "500 internal error"... I have a compiled cgi script with "C" commands but it doesn´t work. Not even scripts written in Perl work.

I thought it was because it didn`t have Perl or C compiler installed on the computer but it looks like it has them.
What permissions did you set on the scripts? Take a look in your error_log file it should give more details.
 
Old 01-23-2005, 12:47 PM   #3
Dapernia
LQ Newbie
 
Registered: Jul 2003
Location: Merida - Venezuela
Distribution: Ubuntu 7.04
Posts: 14

Original Poster
Rep: Reputation: 0
APACHE SERVER PROBLEMS

The error is when i try to access with the Browser any page, it tries to connect to the server but it never does, and after a very long time it`s still trying to find the page (this happens in windows) finally it says that the host is unreachable

About the permissions i`m gonna take a look into the log file...

Thanks!!!
 
Old 01-24-2005, 12:56 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Can you post the output from:
netstat -nlp
iptables -nL
 
Old 01-24-2005, 02:33 PM   #5
Dapernia
LQ Newbie
 
Registered: Jul 2003
Location: Merida - Venezuela
Distribution: Ubuntu 7.04
Posts: 14

Original Poster
Rep: Reputation: 0


Thanks a lot David!!!

You know?, I stopped the iptables and it works fine, but is that right? what problems could that
bring me up?
Now, the other problem is with the .cgi programs (The server writes Internal Server error)... I give permissions with chmod a+x to the script but it doesn't work, i checked the error log file and it says this:

Code:
Mon Jan 24 13:30:47 2005] [notice] Apache/2.0.52 (Unix) configured -- resuming normal operations
[Mon Jan 24 13:31:07 2005] [error] [client 167.175.131.196] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jan 24 13:31:24 2005] [error] [client 167.175.131.196] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jan 24 13:47:28 2005] [error] [client 167.175.131.196] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jan 24 13:47:35 2005] [error] [client 167.175.131.196] (13)Permission denied: exec of '/usr/local/apache2/cgi-bin/printenv' failed
[Mon Jan 24 13:47:35 2005] [error] [client 167.175.131.196] Premature end of script headers: printenv
[Mon Jan 24 13:47:35 2005] [error] [client 167.175.131.196] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jan 24 13:48:20 2005] [error] [client 167.175.131.196] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jan 24 13:48:27 2005] [error] [client 167.175.131.196] (13)Permission denied: exec of '/usr/local/apache2/cgi-bin/printenv' failed
[Mon Jan 24 13:48:27 2005] [error] [client 167.175.131.196] Premature end of script headers: printenv
[Mon Jan 24 13:48:27 2005] [error] [client 167.175.131.196] File does not exist: /usr/local/apache2/htdocs/favicon.ico
[Mon Jan 24 13:51:29 2005] [error] [client 167.175.131.196] (13)Permission denied: exec of '/usr/local/apache2/cgi-bin/printenv' failed
[Mon Jan 24 13:51:29 2005] [error] [client 167.175.131.196] Premature end of script headers: printenv
[Mon Jan 24 13:51:29 2005] [error] [client 167.175.131.196] File does not exist: /usr/local/apache2/htdocs/favicon.ico
Can you help me out?
 
Old 01-24-2005, 02:52 PM   #6
Chuck23
Member
 
Registered: Jun 2004
Distribution: Fedora Core1
Posts: 63

Rep: Reputation: 15
I would definitely not run a server without a firewall. Suggest you configure iptables to work with apache. There are numerous scripts available that will do that. SInce you're running Redhat, the easiest way would be to just use the gui and MainMenu --> System Settings --> Security Level and allow http.

But you definitely don't want to run without some kind of firewall.
 
Old 01-25-2005, 10:37 PM   #7
rollinpark
LQ Newbie
 
Registered: Jan 2005
Posts: 10

Rep: Reputation: 0
Sorry to interupt but how do you install apache web server without a C compiler. Most standard installation involves compiling using C compiler first. Are you using apache binaries to install? I am using httpd-2.0.50-i686-pc-linux-gnu.tar.gz binaries under redhat 9 and there seems to be some problem.
 
Old 01-26-2005, 03:03 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Without a compiler you will need to use a binary - probably an rpm.


Dapernia, what are the permissions on those scripts? Are they executable?
 
Old 01-27-2005, 03:57 AM   #9
AzidStar
Newbie
 
Registered: Jan 2005
Distribution: Fedora Core 3
Posts: 12

Rep: Reputation: 0
Could you post the C code for you CGI-scripts?

One common problem (except the chmod problem) is that people forget so put

printf("Content-type: text/html\n\n");

in the beginning.
 
  


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
using apache web server r_squared Linux - Networking 4 12-02-2004 07:57 PM
setting up password protected web forms on an apache web server AZDAVE Linux - Security 3 07-07-2004 12:03 PM
apache web server citrus Linux - Newbie 6 03-24-2004 05:58 AM
apache web server AZDAVE Linux - Newbie 2 10-03-2003 01:52 PM
web server apache sameermanagoli Linux - Software 15 07-07-2003 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:25 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