homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

CGI under Apache2 / Ubuntu
Keep getting "file not found" even though all settings seem in place

10+ Year Member

Msg#: 3565965 posted 5:32 pm on Feb 4, 2008 (gmt 0)


I have been consulting guides to get CGI to work on a VPS but have hit a wall. Iíve activated the cgi mod, Iíve put "AddHandler cgi-script .cgi" at the end of my Apache2.conf file, and Iíve put the following into my the sites-available file for the domain:

ScriptAlias /cgi-bin/ /path_to_domain_location/public/cgi-bin
<Directory ď/path_to_domain_location/public/cgi-binĒ> AllowOverride None
Options +ExecCGI -multiviews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

Iíve also chmodíd the cgi scripts to 755, and verified that they are uploaded in ASCII format. Iím getting this error:

...No such file or directory: exec of Ď/path_to_domain_location/public/cgi-bin/test.cgií failed
...Premature end of script headers: test.cgi

Test.cgi is the following simple code for testing:

# hello_s.pl-- simple "hello, world" program to demonstrate basic
# CGI output.
# Print the CGI response header, required for all HTML output
# Note the extra \n, to send the blank line
print "Content-type: text/html\n\n" ;
# Print the HTML response page to STDOUT
print <<EOF ;
<head><title>CGI Results</title></head>
<h1>Hello, world.</h1>
exit ;

Any ideas what iím missing?




Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved