#1  
Old 4th December 2006, 04:41
waldis waldis is offline
Junior Member
 
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Question How do I get cgi working?

Maybe it sounds stupid, but we all face some stuff for the first time... unless someone is born with knowkedge.

I'm having trouble to get cgi working. I created a website, and it's index.html file is in

there is a cgi-bin folder under /srv/www/web2/ so I dumped all my cgi stuff in there, but from index.html (../cgi-bin/products.cgi?...) points me to http://mywebsite.com:280/cgi-bin/products.cgi?... the same as without ../ and gives me "website cannot display the page"

Then I create cgi-bin in /srv/www/web2/web/ and again I get the same... I keep changing permissions and everything, but I'm not getting anywhere...

Please help.

I'm using SuSE 10.1 installed with ISPConfig as outlined in Perfect setup.

On the website I have checkmarked everything with cgi and php, and actually every single option for it...

Thank you,

Waldis

www.iLoveOK.us

Last edited by waldis; 4th December 2006 at 04:50.
Reply With Quote
Sponsored Links
  #2  
Old 4th December 2006, 10:34
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,779
Thanks: 840
Thanked 5,610 Times in 4,421 Posts
Default

The ISPConfig websites are on port 80 and not 280, or did you patch the ISPConfig code to write another Vhost_ispconfig.conf file. Dont mix up the apache server on port 81 which is for the controlpanle only and the 2nd apache on port 80, which is for the websites.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 4th December 2006, 12:19
waldis waldis is offline
Junior Member
 
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default

I changed /etc/apache2/vhosts/Vhosts_ispconfig.conf and /etc/apache2/listen.conf files so it would be on port 280 instead, since my port 80 is blocked from outside, so there is no point sitting on it.

I can access the control panel on port 81 and the website from outside on port 280, just cgi is not working...

Also tried to edit /etc/apache2/default-server.conf and change

ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
to
ScriptAlias /cgi-bin/ "/srv/www/*/cgi-bin/"
to
ScriptAlias /cgi-bin/ "/srv/www/*/web/cgi-bin/"

also <Directory "/srv/www/cgi-bin"> to reflect changes, and restarting Apache, but no good, stil no workie...
__________________
Waldis

www.iLoveOK.us

Last edited by waldis; 4th December 2006 at 12:45.
Reply With Quote
  #4  
Old 5th December 2006, 18:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

What's in your Vhosts_ispconfig.conf? Did you try the test files? http://www.howtoforge.com/forums/showthread.php?t=171
__________________
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
  #5  
Old 6th December 2006, 00:31
waldis waldis is offline
Junior Member
 
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default

I can pull up .pl file, and even when I rename it to .txt I can open it thru my browser, but any other files - just wouldn't find them. I'm attaching Vhosts_ispconfig.conf and the output of ls -l /srv/www/web2/cgi-bin/ > cgi-bin.out in a zip file

Thank you!
__________________
Waldis

www.iLoveOK.us

Last edited by waldis; 7th December 2006 at 02:04.
Reply With Quote
  #6  
Old 6th December 2006, 19:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Please post the contents here directly instead of attaching them in a zip file.
__________________
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
  #7  
Old 7th December 2006, 02:03
waldis waldis is offline
Junior Member
 
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default

Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 192.168.1.103:280
<VirtualHost 192.168.1.103:280>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.mydomain1.com:280
######################################
#
#
<VirtualHost 192.168.1.103:280>
ServerName www.mydomain1.com:280
ServerAdmin webmaster@mydomain1.com
DocumentRoot /srv/www/web1/web
ServerAlias mydomain1.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias  /cgi-bin/ /srv/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /srv/www/web1/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 /srv/www/web1/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /srv/www/web1/phptmp/
php_admin_value session.save_path /srv/www/web1/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/srv/www/web1/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 ^/~([^/]+)(/(.*))? /srv/www/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /srv/www/web1/user/$1/web/$3
</VirtualHost>
#
#
#
######################################
# Vhost: www.mydomain2.com:280
######################################
#
#
<VirtualHost 192.168.1.103:280>
ServerName www.mydomain2.com:280
ServerAdmin webmaster@mydomain2.com
DocumentRoot /srv/www/web2/web
ServerAlias mydomain2.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias  /cgi-bin/ /srv/www/web2/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /srv/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 /srv/www/web2/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /srv/www/web2/phptmp/
php_admin_value session.save_path /srv/www/web2/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/srv/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 ^/~([^/]+)(/(.*))? /srv/www/web2/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /srv/www/web2/user/$1/web/$3
</VirtualHost>
#
#
#

Code:
total 316
-rw-r--r-- 1 root web2      0 Dec  1 01:54 .csc
-r-------- 1 root root      0 Dec  1 01:54 .no_delete
-rwxr-xr-x 1 root root  31333 Dec  3 19:07 bg.gif
-rwxr-xr-x 1 root root   6317 Dec  3 19:07 cgi.cpp
-rwxr-xr-x 1 root root    115 Dec  3 19:07 cgi.h
-rw-r--r-- 1 root root   6071 Oct 24 01:21 cgi.txt
-rwxr-xr-x 1 root root   3156 Dec  3 19:07 comp_details.html
-rwxr-xr-x 1 root root    444 Dec  3 19:07 comp_detailsRow.html
-rwxr-xr-x 1 root root   3149 Dec  3 19:07 companies.cpp
-rwxr-xr-x 1 root root    791 Dec  3 19:07 companies.h
-rwxr-xr-x 1 root root   2088 Dec  3 19:07 companies.html
-rwxr-xr-x 1 root root    203 Dec  3 19:07 companiesRow.html
-rwxr-xr-x 1 root root   1640 Dec  3 19:07 customers.bin
-rwxr-xr-x 1 root root    240 Dec  3 19:07 customers.cpp
-rwxr-xr-x 1 root root    423 Dec  3 19:07 customers.h
-rwxr-xr-x 1 root root    421 Dec  3 19:07 customers.h~
-rwxr-xr-x 1 root root    379 Dec  4 04:58 hello_world.pl
-rwxr-xr-x 1 root root    379 Dec  4 05:09 hello_world.txt
-rwxr-xr-x 1 root root    544 Dec  3 19:07 items.h
-rwxr-xr-x 1 root root  11202 Dec  3 19:07 main.cpp
-rwxr-xr-x 1 root root   4319 Dec  3 19:07 prd_details.html
-rwxr-xr-x 1 root root    288 Dec  3 19:07 prd_detailsRow.html
-rwxr-xr-x 1 root root   4624 Dec  3 19:07 products.bin
-rwxr-xr-x 1 root root 143432 Dec  3 19:07 products.cgi
-rwxr-xr-x 1 root root   2313 Dec  3 19:07 products.cpp
-rwxr-xr-x 1 root root    650 Dec  3 19:07 products.h
-rwxr-xr-x 1 root root   2659 Dec  3 19:07 products.html
-rwxr-xr-x 1 root root    358 Dec  3 19:07 productsRow.html
-rwxr-xr-x 1 root root   1640 Dec  3 19:07 suppliers.bin
-rwxr-xr-x 1 root root    746 Dec  3 19:07 suppliers.cpp
-rwxr-xr-x 1 root root    423 Dec  3 19:07 suppliers.h
-rwxr-xr-x 1 root root    421 Dec  3 19:07 suppliers.h~
__________________
Waldis

www.iLoveOK.us
Reply With Quote
  #8  
Old 7th December 2006, 17:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Looks ok. Does hello_world.pl work then?
__________________
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
CGI Not Working mfiendd Server Operation 7 12th July 2006 13:39
CGI Not Working mphayesuk General 4 26th June 2006 12:24
CGI issues - 403 Error- Forbidden! itgroup Installation/Configuration 4 2nd June 2006 10:43
Can't get CGI going.. scherpenzeel Installation/Configuration 5 19th May 2006 16:17
cgi not working tom Installation/Configuration 11 6th May 2006 19:33


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


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