|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
After setting up Fedora Core 7 on my machine, ran apache with its default configuration. Somehow can't get the cgi scripts to run. The error_log file indicates the following error : Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] (8)Exec format error: exec of '/var/www/cgi-bin/route.cgi' failed [Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] Premature end of script headers: route.cgi This script runs fine on the command interpreter and has worked fine previously with other . The permissions seem to be okay. Read and Execute access is granted to Group and Others for files within the cgi- bin directory. Is there anything else i should be looking out for ? The script is given below : #!/usr/bin/perl -w use strict; use CGI; my $ROUTE = 'cat /proc/net/route'; my $q = new CGI; local *PIPE ; open PIPE, "$ROUTE |" ; print "Content-type: text/plain\n\n"; print while <PIPE> ; close PIPE; These are the relavant portions of the httpd.conf file ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" # # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "/var/www/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
vivekian <viveklinux@gmail.com> wrote in news:1181057477.564127.17180
@g4g2000hsf.googlegroups.com: > Hi, > > After setting up Fedora Core 7 on my machine, ran apache with its > default configuration. > Somehow can't get the cgi scripts to run. The error_log file indicates > the following error : > > Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] (8)Exec format > error: exec of '/var/www/cgi-bin/route.cgi' failed > [Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] Premature end of > script headers: route.cgi > > This script runs fine on the command interpreter and has worked fine > previously with other . The permissions seem to be okay. Read and > Execute access is granted to Group and Others for files within the cgi- > bin directory. Is there anything else i should be looking out for ? > The script is given below : > > #!/usr/bin/perl -w > > use strict; > use CGI; > > my $ROUTE = 'cat /proc/net/route'; > my $q = new CGI; > local *PIPE ; > open PIPE, "$ROUTE |" ; > print "Content-type: text/plain\n\n"; > print while <PIPE> ; > close PIPE; > > These are the relavant portions of the httpd.conf file > > ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" > > # > # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased > # CGI directory exists, if you have that configured. > # > <Directory "/var/www/cgi-bin"> > AllowOverride None > Options None > Order allow,deny > Allow from all > </Directory> > > Somewhere there needs to be an: Options ExecCgi Have you tried that, or even a simple "hello world" script instead a complex script? ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Jun 5, 11:01 am, Mark Taylor <mtayl...@xlrim.com> wrote:
> vivekian <vivekli...@gmail.com> wrote in news:1181057477.564127.17180 > @g4g2000hsf.googlegroups.com: > > > > > Hi, > > > After setting up Fedora Core 7 on my machine, ran apache with its > > default configuration. > > Somehow can't get the cgi scripts to run. The error_log file indicates > > the following error : > > > Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] (8)Exec format > > error: exec of '/var/www/cgi-bin/route.cgi' failed > > [Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] Premature end of > > script headers: route.cgi > > > This script runs fine on the command interpreter and has worked fine > > previously with other . The permissions seem to be okay. Read and > > Execute access is granted to Group and Others for files within the cgi- > > bin directory. Is there anything else i should be looking out for ? > > The script is given below : > > > #!/usr/bin/perl -w > > > use strict; > > use CGI; > > > my $ROUTE = 'cat /proc/net/route'; > > my $q = new CGI; > > local *PIPE ; > > open PIPE, "$ROUTE |" ; > > print "Content-type: text/plain\n\n"; > > print while <PIPE> ; > > close PIPE; > > > These are the relavant portions of the httpd.conf file > > > ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" > > > # > > # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased > > # CGI directory exists, if you have that configured. > > # > > <Directory "/var/www/cgi-bin"> > > AllowOverride None > > Options None > > Order allow,deny > > Allow from all > > </Directory> > > Somewhere there needs to be an: > > Options ExecCgi > > Have you tried that, or even a simple "hello world" script instead a > complex script? > It worked with a simpler script. Don't think the server had permissions to execute to read the route file. |
|
![]() |
| Outils de la discussion | |
|
|