#1  
Old 14th July 2006, 05:35
E.L. Hibee E.L. Hibee is offline
Junior Member
 
Join Date: May 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Question CGI Downloading

Hi

I have attepted to install a cgi photo album on my site (setup on my suse 10 server) however whenever I try to go to that album IE attempts to download the cgi file.

http://www.thebigman.co.uk/cgi-bin/mem_photo/index.cgi

If I leave out the index.cgi part I get a 403 error.

I have tried with other test cgi files and the same thing happens

I am not very clued up on this so any help as always is appreciated.

Cheers

Last edited by E.L. Hibee; 14th July 2006 at 18:16.
Reply With Quote
Sponsored Links
  #2  
Old 15th July 2006, 13:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Can you post your vhost configuration here?
Do you have something similar to

Code:
ScriptAlias  /cgi-bin/ /path/to/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
in it?
Also have a look here: http://httpd.apache.org/docs/2.0/howto/cgi.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 19th July 2006, 03:22
E.L. Hibee E.L. Hibee is offline
Junior Member
 
Join Date: May 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Cool

Is it the Vhosts_ispconfig.conf file you are talking about?

If so the the Vhost section for this site is:

Quote:
######################################
# Vhost: www.thebigman.co.uk:80
######################################
#
#
<VirtualHost 192.168.0.183:80>
ServerName www.thebigman.co.uk:80
ServerAdmin webmaster@thebigman.co.uk
DocumentRoot /home/www/web2/web
ServerAlias thebigman.co.uk
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 i
ndex.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /home/www/web2/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /home/www/web2/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /home/www/web2/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /home/www/web2/phptmp/
php_admin_value session.save_path /home/www/web2/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
AddType text/vnd.wap.wml .wml
AddType text/vnd.wap.wmlscript .ws .wmlscript
AddType image/vnd.wap.wbmp .wbmp
Alias /error/ "/home/www/web2/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /home/www/web2/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web2/user/$1/web/$3
</VirtualHost>
#
#
also after reading the link you supplied I added

Quote:
<Directory /home/www/*/web>

Options +ExecCGI
AddHandler cgi-script .cgi

</Directory>

This did not solve the issue, but now does mean I can allow cgi in any folder which is what I was after as well, so thanks for that it helped a bit.

I have also ran:

Quote:
web1:/home/www/web2/cgi-bin # ./cgitest.cgi
-bash: ./cgitest.cgi: /usr/bin/perl^M: bad interpreter: No such file or directory
Is my path to perl wrong?

I have tried searching through the web and forums for days now but cannot see anything, maybe I am just searching for the wrong thing

Cheers

Last edited by E.L. Hibee; 19th July 2006 at 07:11.
Reply With Quote
  #4  
Old 20th July 2006, 12:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Quote:
Originally Posted by E.L. Hibee
Is it the Vhosts_ispconfig.conf file you are talking about?
Ah, you're using ISPConfig...

You must put your CGI scripts into /home/www/web2/cgi-bin/ and make them executable, then it should work out of the box.


Quote:
Originally Posted by E.L. Hibee
Code:
-bash: ./cgitest.cgi: /usr/bin/perl^M: bad interpreter: No such file or directory
Is my path to perl wrong?
If you see this: ^M at the end of your lines it means you saved the file with Windows linebreaks, not with Unix linebreaks. Save the file with Unix linebreaks (some editors on Windows allow you to do this) and try again.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php as cgi thedoc Installation/Configuration 16 28th December 2006 18:14
converting a 10 line cgi to php. edge Programming/Scripts 6 3rd June 2006 22:40
CGI issues - 403 Error- Forbidden! itgroup Installation/Configuration 4 2nd June 2006 09:43
Perl and cgi script installation linuxuser1 General 30 26th April 2006 23:09
Ispconfig cgi hosting Mahir General 6 21st November 2005 15:40


All times are GMT +2. The time now is 09:10.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.