Allow CGI execution within domain's webroot

1 post / 0 new
#1 Thu, 04/12/2007 - 15:00

Allow CGI execution within domain's webroot

Hi, I have a RHEL 64-bit server(cpu and os) on which I have a problem. I have a cgi installer script that needs to be run within the root www directory of the domain. You are then to browse to the domain and finish the script installation into a subdirectory. I don't think that anything has to permanently execute from the root of the domain as you are instructed to remove the files placed in the domain root after the installation is complete.

My Virtualmin Pro install is default except for the modifications mentioned below that I did, to try to get the script to execute.

My domain hierarchy in question is, if it would matter, as follows: Root User:Reseller User: mydomain User

I don't know if that made sense, but the www root, that I am working within, belongs to the domain user.

Here's what I have done so far. I went to "Configure Website">(per directory options)mydomain/public_html>document options>allow cgi execution, changed to "yes">saved changes>applied changes

At this point I received an error that said Metafiles must either be Off or On. Upon checking the httpd.conf file it was not saving any change made within Virtualmin. I tried several times to select either on or off within Virtualmin and save and apply the changes and everytime that I would again check the httpd.conf file (line 1078 I think) it would not have anything specified for Metafiles(just the word "Metafiles" with nothing after it.

I manually edited the httpd.conf file to turn Metafiles on and restarted Apache.

Up to this point, the browser would spit out the text of the install script instead of executing it.

Next, in the same menu, I did "Edit Directives" and added the lines: AddHandler cgi-script .cgi Options +ExecCGI

These were suggestions that I found to get cgi scripts to execute outside of the cgi-bin directory.

Lastly, browsing to the URL to execute the install script, I now get a 500 Internal Server Error Message.

This is where I sit now. I feel that I can reverse the damage that I have done, since I have a log of changes that I made. So........ If anyone can help, I would sincerely appreciate it. I need to learn this, not just have someone else do it for me. That teaches me nothing for the future.

It is all just very frustrating to a new admin.

I hope this makes sense to someone!

Best Regards, Dan Pueppke-COO Dakota Daughter Enterprises, LLC Alexandria, SD USA 708-808-1004