Perl files wont open, give 404
I have a vps running whm and cpanel.
[LIST]
CENTOS 6.9 kvm
whm v66.0.23
easy apache 4
No .pl files will run, but instead return an error 404. whether or not they are in the cgi-bin directory. Text files that are in the cgi-bin also give a error 404.
I have checked permissions. The cgi-bin directory is 0755, and the files inside are 0644.
In WHM in global appache setup changed "directory "/" options" to inlcude exeCGI, followSymLinks, Inlcudes, IncludesNOEXEC, Indexes, SymLinksIfOwnerMatch
then restarted apache.
In my httpd.conf
I found this line was already there:
# These extensions are used to redirect incoming requests to WHM
AddHandler cgi-script .cgi .pl .plx .ppl .perl
I tried adding this to my .htaccess as well:
AddHandler cgi-script .cgi .pl
Options +ExecCGI +IncludesNOEXEC
XBitHack on
I found a link that said I needed to change my virtualhost to include this line:
ScriptAlias /cgi-bin/ "/var/www/vhosts/mysite.com/httpdocs/cgi-bin/"
but my httpd.conf has this line already:
ScriptAlias /cgi-bin/ /home/qsginc/public_html/cgi-bin/
which is the right directory.
I found this link in the forums here:
Perl files return 404
but it's not really for easy appache 4
Can someone please let me know what I missed here?
-
I have checked permissions. The cgi-bin directory is 0755, and the files inside are 0644.
Hello, Try updating the .pl files to 0755 permissions. Also, browse to "WHM >> Modify an Account" and ensure "CGI Privilege" is enabled for the account in-question. Thank you.0 -
Thanks for your help! I changed the permissions to 0755 and confirmed CGI privilege. No change in behavior. I still get the error. Also, it's a 500 error, not 404. I tried changing my question, but it said I couldn't because it had spam. I don't know why it would say that. 0 -
Also, it's a 500 error, not 404. I tried changing my question, but it said I couldn't because it had spam. I don't know why it would say that.
What output do you see in /usr/local/apache/logs/error_log when you notice the 500 error code? Thank you.0 -
[Tue Nov 21 09:18:06.473958 2017] [cgid:error] [pid 14058:tid 140005927765984] (2)No such file or directory: AH01241: exec of '/home/user/public_html/cgi-bin/head.pl' failed 0 -
Hello, What permission and ownership values are configured for the /home/$username/public_html/cgi-bin/ directories and above (up to /home/$username)? Thank you. 0 -
755 0 -
Hello, Feel free to open a support ticket using the link in my signature so we can take a closer look. Thank you. 0
Please sign in to leave a comment.
Comments
7 comments