Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why 404 Error

Status
Not open for further replies.

optimised

Technical User
Jun 21, 2001
96
US
Even if I type absolute path in browser
I get 404 error I'm 100% sure the directory exist.

path on server = home/mydomain/
#!/usr/bin/perl
#
print "Content-type: text/html\n\n";
print "Hello World\n";

I ran >perl -c test.cgi
syntax fine
Then >perl - w test.cgi
Hello World

command line works fine returns- Hello World.
/cgi-bin>#perl test.cgi

But running I keep getting internal error 505
Error_log
[error] (2) No such file or directory: exec of /home/mydomain/[error] Premature end of script headers

## httpd.conf - configuration for the Apache web server
#enable cgi-scripts
AddHandler cgi-script .cgi .pl

ScriptAlias /cgi-bin/ "/home/mydomain/cgi-bin/"

<Directory &quot;/home/mydomain/cgi-bin&quot;>
Options None
AllowOverride None
Order allow,deny
Allow from from all
</Directory>

# Virtual host mydomain
<VirtualHost x.x.x.x>
DocumentRoot /home/mydomain/www/
ServerName ScriptAlias /cgi-bin/ &quot;/home/mydomain/cgi-bin/&quot;
ServerSignature email
</VirtualHost>

Do I need to add something else to httpd file?
 
try
Code:
chmod 0755 test.cgi
and then try running accessing it through the web...
AV
tnedor@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top