.htaccess cgi

I try many times to run cgi scripts.
I located cgi script in "scgi-bin".
then I add the folloing in  "/public_html/.htaccess"
AddModule mod_cgi.c
AddModule mod_alias.c  
<IfModule mod_alias.c>
ScriptAlias /cgi-bin/ "/home/jorysoft/public_html/scgi-bin"
    <Directory "/home/jorysoft/public_html/scgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
 AddHandler cgi-script .cgi

But not working
I got this massage rrror :
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@jorysoft.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should check /var/log/httpd/error.log (RedHat) or /var/log/apache2/error.log (Debian). There you can see the real error.
cat /var/log/httpd/error_log
[Fri Nov 14 14:24:47 2008] [error] [client x.x.x.x] (8)Exec format error: exec of '/../image.gif' failed, referer: https://...

Open in new window

> then I add the folloing in  "/public_html/.htaccess"

That should go into your httpd.conf, not .htaccess

> AddModule mod_cgi.c
> AddModule mod_alias.c  

AddModule is a directive from apache 1.3x, do you use this version?
sal1150Author Commented:
Apache  version is 1.3.41 (Unix) .
but I did no find "httpd.conf".
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Depending upon your configuration the file should live in a folder called "conf".

You may also call
apache -V  or
httpd -V  via shell, which should show you the compile options. The path should be HTTPD_ROOT + SERVER_CONFIG_FILE.
James LooneySr. Programmer/AnalystCommented:
your httpd.conf may be in /etc/httpd/
sal1150Author Commented:
no it is not in /etc/httpd/
 -D HTTPD_ROOT="/etc/httpd"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


My httpd.conf is in: /etc/httpd/conf/httpd.conf

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sal1150Author Commented:
I DO NOT HAVE a reason?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.