CGI problem WHM / cPanel running CGI script
I"m going to set up CGI at out new Apache server with cPanel for running Miva " no comments please, know Miva is kind of outdated for mosts, but it works extremely well when running, and we do have a huge site not rewritten to PHP, that we wish to move to the new server:
Centos 6.6 x86_64 vmware, WHM 11.48.2 (build 3).
I am going to add two simple lines to httpd.conf:
AddType application/x-miva .mv
Action application/x-miva /cgi-bin/miva
-and used the Include Editor in Pre Virtual Hosts (2.2.29); recompile/restart Apache. Checked that the line shows up in the "pre_virtualhost_global.conf"-file.
However the mime-type do not show at any user"s cPanel and CGI-scripts cannot run, shows error 500 (which don"t tell much).
The script-engine and .conf-file are placed in the Vhost"s cgi-bin.
That"s supposed to work as simple as that, and last time I did the set-up (2011) everything worked well right away, I followed exactly same procedure this time (chmod 0755 etc. on script-engine).
However, now there is a ModSecurity in cPanel and our Server Provider recommended us to buy the full ConfigServer version, which they kindly installed and configured for us. I tried to switch it "off", but that didn"t change anything.
SuEXEC is "on" " everything in WHM stays in default mode " and in Service Configuration > Global Services > Directory Options, ExecCGI and other options are "on" except Includes and MultiViews "off" (all default settings). Have tried suEXEC "off" and Includes "on", but still the same error 500 (nothing happens). :(
Do any of the WHM/cPanel experts here have any suggestion for what may be the problem " and how to solve it " or what I may do wrong...?
Many thanks for any help. :)
-
Hello, What's the exact entry you see in /usr/local/apache/logs/error_log when the browser shows a 500 error message? Thank you. 0 -
Hello. I happend to have a similar issue trying to install an old Miva Empresa with suExec. I'm getting similar problems Did you ever solved this? How? When I add this (AddType application/x-miva .mv" and "Action application/x-miva /cgi-bin/miva) to the virtualhost conf, the test file diag.mv downloads. When I remove them the page shows a 500 error. If a add an apache handler directly in cpanel: either server-parsed o cgi-script with .mv extension, I get the file parsed partially, but the test doesn't work and the URL's in the links provide come out broken, like this: domain.com/&[%20s.documenturl%20]Test=sysvars">domain.com/&[ s.documenturl ]Test=sysvars Instead of like this: domain.com/diag.mv?Test=sysvars Any information will be greatly apreciated since I'm no expert in this matters eventhough I must get this up an running in a new server urgently. Thanks in advance. 0 -
When I remove them the page shows a 500 error.
What do you see in /usr/local/apache/logs/error_log when the browser shows a 500 error message? Thank you.0 -
Sorry for not being back (I'm the original OP, I did check first days, but as no reply I thought I would get an email notification if answered). My Error_log just says: [Sat May 30 11:24:18 2015] [error] [client 1.0.222.75] suexec failure: could not open log file [Sat May 30 11:24:18 2015] [error] [client 1.0.222.75] fopen: Permission denied [Sat May 30 11:24:18 2015] [error] [client 1.0.222.75] Premature end of script headers: miva [Sat May 30 11:24:18 2015] [error] [client 1.0.222.75] File does not exist: /home/helenettet/public_html/500.shtml Also checked Suexec_log: [2015-05-30 09:06:37]: uid: (503/helenettet) gid: (514/helenettet) cmd: miva [2015-05-30 09:06:56]: uid: (503/helenettet) gid: (514/helenettet) cmd: diag.mv [2015-05-30 09:06:56]: file has no execute permission: (/home/helenettet/public_html/cgi-bin/diag.mv) I have searched numerous forums around the web for an solution. Poster "Wrafico" above, seemed to have the same problem, and I today only found his posting in a Miva-forum of April 30th and till May 4th, where Miva says "Empresa 3 will still run on modern OS's, at least through CentOS 6; haven't tested on 7. It will even run on 64-bit," and kindly inform the simple 4-step set-up running the binary in the CGI-bin: 1) Put the 'miva' binary in the site's cgi-bin folder. 2) Create a miva.conf along side the binary in the cgi-bin folder with the following base config: securityoptions=7 redirectonly=yes dnslookup=off validextensions=.mv mivaroot=/path/to/httpdocs stdmodedatadir=/path/to/mivadata 3) Add the following lines to that site's apache config: AddType application/x-miva .mv Action application/x-miva /cgi-bin/miva 4) Restart apache That's the same procedure I have been following (CentOS6) and also used in 2011. Source: 0 -
Hello, What PHP handler are you using (e.g. DSO, suPHP)? Thank you. 0 -
suPHP 0
Please sign in to leave a comment.
Comments
7 comments