LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   500 Internal Server Error (https://www.linuxquestions.org/questions/red-hat-31/500-internal-server-error-655247/)

shahz 07-12-2008 01:42 AM

500 Internal Server Error
 
I have installed greenstone properly on my system, I have default apache server running on my pc, I have alias for the greenstone file like following.

ScriptAlias /gsdl/cgi-bin "/opt/greenstone/cgi-bin"
<Directory "/opt/greenstone/cgi-bin">
Options None
AllowOverride None
</Directory>

Alias /gsdl "/opt/greenstone"
<Directory "/opt/greenstone">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

but when I start my web server I can't access the cgi-bin directory.

my httpd error log is like

rror] [client 127.0.0.1] (13)Permission denied: exec of '/opt/greenstone/cgi-bin/library' failed
[Sat Jul 12 11:22:01 2008] [error] [client 127.0.0.1] Premature end of script headers: library
[Sat Jul 12 11:22:01 2008] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico


can any body help how to resolve this. thanks in advance

thanks
shahz

Acron_0248 07-12-2008 03:00 AM

You should add Options ExecCGI for the /gdsl/cgi-bin directory

Also check the permissions of the files at /opt/greenston/cgi-bin, they should be executable (like 0755 or so)

shahz 07-12-2008 03:14 AM

Quote:

Originally Posted by Acron_0248 (Post 3211970)
You should add Options ExecCGI for the /gdsl/cgi-bin directory

I have given full permission for a test purpose the cgi-bin directory permissions are 777, what is ExecCGI for the /gsdkl/cgi-bin please explain a bit.

thanks
shahz

shahz 07-12-2008 04:10 AM

I downloaded the new version for the apache server, installed the source did every thing as it was needed.

again when I access the my local url I get the error

http://localhost/gsdl/cgi-bin/

I get the error

Forbidden

You don't have permission to access /gsdl/cgi-bin/ on this server.

I have full permissions for the directory but still I am not able to access it. any suggations.

thanks
shahz

Acron_0248 07-12-2008 04:27 AM

ExecCGI gives execution permissions at server level (not at files level like 777 for instance)

When a script is called and that script is executed by a defined cgi handler, the server verify that the directory containing the script have execute permissions so the script can be executed by the cgi handler, the ExecCGI option gives that permission.

About the other one, you shouldn't have problem if you add to <Directory "/opt/greenstone/cgi-bin"> the following:
Code:

Order allow,deny
Allow from all

Although (and someone please correct me if I'm wrong with this) you, as a user, don't need access directly to http://localhost/gdsl/cgi-bin, I mean, going to that URL and recieving a 403 error doesn't mean that it's a problem since what it's actually required is that the scripts that runs under the cgi-handler have the right access, again, I'm not sure about this one, however, in case I'm wrong the Order allow,deny I put before should work

shahz 07-12-2008 05:03 AM

finally it works

what I did in the httpd.conf file

I added the following

<Directory /gsdl/cgi-bin>
Options +ExecCGI
</Directory>

AddHandler cgi-script .cgi .pl

thanks acron

shahz

Acron_0248 07-12-2008 05:54 AM

No problem, glad to be of help ;)

flyblogger 12-10-2008 08:38 AM

Help me too
 
Hello everybody,

I have the same problem which had Shahz with the installation of Greenstone.

I'm installing Greenstone on Mac OS X Leopard, being a Unix system I'm writing here.

When I go to http://localhost/gsdl/cgi-bin/
All i get is this error message: "403 Forbidden - You don't have permission to access /gsdl/cgi-bin/ on this server. - Apache/2.0.59 (Unix) PHP/5.2.6 DAV/2 Server at localhost Port 8888".

I added this to the httpd.conf file:
Code:

ScriptAlias /gsdl/cgi-bin "/Users/Flavia/Documents/Greenstone2/cgi-bin"
  <Directory /Users/Flavia/Documents/Greenstone2/cgi-bin>
    Options None
    AllowOverride None
  </Directory>
 
  Alias /gsdl "/Users/Flavia/Documents/Greenstone2"
  <Directory /Users/Flavia/Documents/Greenstone2>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>

Can you please Shahz tell me what you exactly wrote in your httpd.conf file?

Thank you very much.

PS: sorry for my italian-english! :D

shahz 03-31-2009 02:50 AM

I have already written in my above post what I added in httpd.conf

check out that.

thanks
shahz

vlademir 03-31-2009 03:05 AM

always about the same subject : 500 Internal Server Error
i uploaded using ftp my website files to my server at /var/www/web1/web/
when i type my web www.website.com i got the 500 internal server error
i tried to change the permission to 0755 but nothing
somebody have any idea how to resolve this problem ?
thanks in advance


All times are GMT -5. The time now is 10:27 AM.