#1  
Old 15th May 2006, 00:12
scherpenzeel scherpenzeel is offline
Junior Member
 
Join Date: May 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't get CGI going..

Hi I am strugling with the installation of Qmail(rocks.org) on my Debian with apache2. The thing is that when I try to get into http://my.dedicated.server.nl/cgi-bin/vqadmin..etc I get the question if I want to download the file .... (no i do not want that..)

I have tried serveralthings the past weeks but it is still not working (learned a lot about apche, debian etc... but not the thing I needed now).

So can anyone help me to get this thing going now? Thanks in advace..

So here is what I have got for now:

my config (which I have in sites-enabled/000-default):

Code:
NameVirtualHost * 
<VirtualHost *> 
ServerAdmin webmaster@localhost 

DocumentRoot /var/www/ 
<Directory /> 
Options FollowSymLinks 
AllowOverride all 
</Directory> 
<Directory /var/www/> 
Options Indexes FollowSymLinks MultiViews 
AllowOverride all 
Order allow,deny 
allow from all 
# This directive allows us to have apache2's default start page 
# in /apache2-default/, but still have / go to the right place 
#RedirectMatch ^/$ /apache2-default/ 
</Directory> 

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 
<Directory "/usr/lib/cgi-bin"> 
AllowOverride all 
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch 
Order allow,deny 
Allow from all 
</Directory> 

# ScriptAlias /cgi-bin/ /var/www/mijn.dedicated.servernation.nl/cgi-bin/ 
<Directory "/var/www/mijn.dedicated.servernation.nl/cgi-bin/"> 
allow from all 
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
# AddHandler cgi-script .cgi .pl 
AllowOverride All 
Order deny,allow 
</Directory> 

ErrorLog /var/log/apache2/error.log 


# Possible values include: debug, info, notice, warn, error, crit, 
# alert, emerg. 
LogLevel warn 

CustomLog /var/log/apache2/access.log combined 
ServerSignature On 

Alias /doc/ "/usr/share/doc/" 
<Directory "/usr/share/doc/"> 
Options Indexes MultiViews FollowSymLinks 
AllowOverride all 
Order deny,allow 
Deny from all 
Allow from 127.0.0.0/255.0.0.0 ::1/128 
</Directory> 

Alias /phpMyadmin/ "/var/www/phpMyadmin/" 

<Directory "/var/www/phpMyadmin/"> 
Options MultiViews 
AllowOverride all 
Order allow,deny 
Allow from all 
</Directory> 


</VirtualHost> 
NameVirtualHost *:80 

# VirtualHost example: 
# Almost any Apache directive may go into a VirtualHost container. 


<VirtualHost _default_:*> 
</VirtualHost> 

#--- hier de welkom pagina van de dedicated server als er geen site is maar wel een domeinnaam / vhost for the dedicated when no site but domain name avialbl.----- 

<VirtualHost *:80> 
DocumentRoot "/var/www/mijn.dedicated.servernation.nl" 
ServerName mijn.dedicated.servernation.nl 
ServerAlias mijn.dedicated.servernation.nl 
<Directory "/var/www/mijn.dedicated.servernation.nl"> 
Options -Indexes 
</Directory> 

#put here the vhosts/ vanaf hier de virtual hosts neerzetten die op de server staan ----- 

<VirtualHost *:80> 
DocumentRoot "/var/www/site1.nl" 
ServerName www.site1.nl 
ServerAlias site1.nl 
<Directory "/var/www/site1.nl"> 
Options Indexes 
</Directory> 
</VirtualHost> 


<VirtualHost *:80> 
DocumentRoot "/var/www/site2.nl" 
ServerName www.site2.nl 
ServerAlias site2.nl 
<Directory "/var/www/site2.nl"> 
Options Indexes 
</Directory> 
</VirtualHost> 

Additional info: 
the rights per vhost / dir: 

drwxr-xr-x 3 user www-data 4096 2006-05-01 10:00 website1.nl 
drwxr-xr-x 6 user root 4096 2006-05-04 21:31 mijn.dedicated.servernation.nl 

drwxr-xr-x 4 user root 4096 2006-04-22 20:32 www.website2.nl 
drwxr-xr-x 2 user root 4096 2006-05-01 13:07 www.website3.nl 
drwxr-xr-x 2 user www-data 4096 2006-05-01 10:58 www.website4.nl 

The test.cgi which I have put in the cgi-bin and gives the same question.. 

#!/usr/bin/perl 

use CGI qw/:standard -no_xhtml/; # load standard CGI routines 

print header(), # create the HTTP header 
start_html('Hello World demo'), # start the HTML 
p('Hello, World.'), 
end_html(); # end the HTML 

#end of script
This is amongst others in /usr/bin/:

perl
perl5.8.4
perlbug
perlcc
perldoc

Cgi is loaded by apache2 (mods-available)

this is the listing of that vhost:
~# ls -al /var/www/my.dedicated.servernation.nl/cgi-bin/
total 160
drwxr-xr-x 3 user1 user1 4096 2006-05-09 23:26 .
drwxr-xr-x 6 user1 root 4096 2006-05-04 21:31 ..
-rwxr-xr-x 1 root root 84 2006-05-09 17:09 first.pl
-rw-r--r-- 1 user1 user1 137816 2006-05-01 11:02 qmailadmin
-rw-r--r-- 1 root root 308 2006-05-11 16:40 test.cgi
drwxr-xr-x 3 user1 user1 4096 2006-05-01 12:31 vqadmin


ls -al /var/www/my.dedicated.servernation.nl/cgi-bin/vqadmin/
total 116
drwxr-xr-x 3 user1 user1 4096 2006-05-01 12:31 .
drwxr-xr-x 3 user1 user1 4096 2006-05-09 23:26 ..
-rw-r--r-- 1 www-data root 110 2006-05-01 12:31 .htaccess
drwxr-xr-x 2 user1 user1 4096 2006-05-01 11:02 html
-rw-r--r-- 1 user1 user1 864 2006-05-01 11:02 vqadmin.acl
-rw-r--r-- 1 user1 user1 93820 2006-05-01 11:02 vqadmin.cgi

Also: bbout the .htaccess file. I only get the pasword/usern question once? After loggin in I can just refresh the page but I do not get that input screen again. Is the .htaccess chaching me? Is is even working?

Last edited by scherpenzeel; 15th May 2006 at 00:15.
Reply With Quote
Sponsored Links
  #2  
Old 15th May 2006, 17:06
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 change

Code:
<VirtualHost *:80> 
DocumentRoot "/var/www/mijn.dedicated.servernation.nl" 
ServerName mijn.dedicated.servernation.nl 
ServerAlias mijn.dedicated.servernation.nl 
<Directory "/var/www/mijn.dedicated.servernation.nl"> 
Options -Indexes 
</Directory>
to

Code:
<VirtualHost *:80> 
DocumentRoot "/var/www/mijn.dedicated.servernation.nl" 
ServerName mijn.dedicated.servernation.nl 
ServerAlias mijn.dedicated.servernation.nl 
<Directory "/var/www/mijn.dedicated.servernation.nl"> 
Options -Indexes 
</Directory>
ScriptAlias /cgi-bin/ /var/www/mijn.dedicated.servernation.nl/cgi-bin/ 
AddHandler cgi-script .cgi .pl
<Directory "/var/www/mijn.dedicated.servernation.nl/cgi-bin/"> 
allow from all 
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
AllowOverride All 
Order deny,allow 
</Directory> 
</VirtualHost>
and restart Apache.

Quote:
Originally Posted by scherpenzeel
Also: bbout the .htaccess file. I only get the pasword/usern question once? After loggin in I can just refresh the page but I do not get that input screen again. Is the .htaccess chaching me? Is is even working?
That's normal.
__________________
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 15th May 2006, 19:12
scherpenzeel scherpenzeel is offline
Junior Member
 
Join Date: May 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Falko, your great help, "has really made my day"!. Your solution worked instantly. Thanks again.

Sincce I am always interested in the why of things, do I need to have this in al my vhosts, if I want to have cgi working in those as wel? Or will these setting do for all?
Reply With Quote
  #4  
Old 16th May 2006, 17:56
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

You need this in all your vhosts.
__________________
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 19th May 2006, 00:25
scherpenzeel scherpenzeel is offline
Junior Member
 
Join Date: May 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok thanks,

now I have qmail working, but cant get Clamav started becouse of this error:

Starting ClamAV daemon: ERROR: Parse error at line 14: Unknown option logFile.
ERROR: Can't open/parse the config file /etc/clamd.conf

this is in the config:
##
## Example config file for the Clam AV daemon
## Please read the clamd.conf(5) manual before editing this file.
##


# Comment or remove the line below.
#Example

# Uncomment this option to enable logging.
# LogFile must be writable for the user running daemon.
# A full path is required.
# Default: disabled
logFile /var/log/clamav/clamd.log

This is what I chown the clamd.log to:
chown clamav:users /var/log/clamav/clamd.log

# ls -al /var/log/clamav/
total 28
drwxr-xr-x 2 clamav clamav 4096 2006-05-18 16:27 .
drwxr-xr-x 12 root root 4096 2006-05-18 08:25 ..
-rw-r--r-- 1 clamav users 3 2006-05-18 15:02 clamd.log
-rw-r----- 1 clamav users 7100 2006-05-18 21:17 clam-update.log
-rw-r----- 1 clamav adm 5394 2006-05-18 22:48 freshclam.log

but stil not working:
Reply With Quote
  #6  
Old 19th May 2006, 16:17
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

Must be
Code:
LogFile /var/log/clamav/clamd.log
__________________
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 19:14
Perl and cgi script installation linuxuser1 General 30 27th April 2006 00:09
Internal Server Error 500 cgi script mphayesuk General 6 8th February 2006 23:53
Centos 4.2 CGI error redhatlover Server Operation 12 31st December 2005 16:34
Ispconfig cgi hosting Mahir General 6 21st November 2005 16:40


All times are GMT +2. The time now is 05:12.


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