CGI Geht nicht

Alles, was den Apache betrifft, kann hier besprochen werden.

CGI Geht nicht

Postby scherpenzeel » 10. May 2006 14:11

Ich habe ein problem. versuche ein .cgi file zu aufnen aber das geht nicht.

Weiter ins Englisch...:)

On my debian system I have apache2 running. Try to open the file which is in /var/www/cgi-bin/....cgi

Getthe question if I want to download the file... ? No I do not want that I want the file to be parsed.

What can I do? To solve the problem.
scherpenzeel
 
Posts: 4
Joined: 10. May 2006 13:21

Postby scherpenzeel » 12. May 2006 07:54

This is what I have in my config file I also put soem additional info here:
Stil not get it working...


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

this is in the apache.log file:

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
scherpenzeel
 
Posts: 4
Joined: 10. May 2006 13:21

Postby scherpenzeel » 15. May 2006 17:21

This is what it made working in the end. Thanks for your great support :)

Please change


Code:
Code: Select all
<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:
Code: Select all
<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.
scherpenzeel
 
Posts: 4
Joined: 10. May 2006 13:21


Return to Apache

Who is online

Users browsing this forum: No registered users and 83 guests