Could anyone help me with this? This one bugs me for couple days...
environment:
running a simple perl cgi script on fedora 21,
Server version: Apache/2.4.10 (Fedora),
This is perl 5, version 18, subversion 4 (v5.18.4) built for x86_64-linux-thread-multi,
getenforce: Permissive
the cgi script:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
use strict;
use warnings;
print "Hello, world!<br />\n";
foreach my $key (keys %ENV) {
print "$key --> $ENV{$key}<br />";
}
problem:
the script won't run in 127.0.0.1/~username/subfolder/
I should knew how to setup perl-cgi environment, and the same code works on 127.0.0.1/cgi-bin, 127.0.0.1/cgi-bin/subfolder/, 127.0.0.1/~username/
I always get "End of script output before headers" when execute script under user's subfolder.
Could anyone helps? Thanks