?
Solved

.htaccess  cgi

Posted on 2008-11-14
8
Medium Priority
?
780 Views
Last Modified: 2013-12-25
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
    </Directory>
</IfModule>
 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.
0
Comment
Question by:sal1150
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 5

Expert Comment

by:dainok
ID: 22959520
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

0
 
LVL 27

Expert Comment

by:caterham_www
ID: 22960077
> 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?
0
 

Author Comment

by:sal1150
ID: 22961126
Apache  version is 1.3.41 (Unix) .
but I did no find "httpd.conf".
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:caterham_www
ID: 22964164
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.
0
 
LVL 6

Expert Comment

by:James Looney
ID: 22983883
your httpd.conf may be in /etc/httpd/
0
 

Author Comment

by:sal1150
ID: 23019915
no it is not in /etc/httpd/
0
 
LVL 5

Accepted Solution

by:
dainok earned 1500 total points
ID: 23155844
# httpd -V | egrep "HTTPD_ROOT|SERVER_CONFIG_FILE"
 -D HTTPD_ROOT="/etc/httpd"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Follow: HTTPD_ROOT/SERVER_CONFIG_FILE

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

Author Closing Comment

by:sal1150
ID: 31516760
I DO NOT HAVE a reason?
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question