Page 1 of 1

Apache ScriptAlias für Openwebmail

Posted: 2003-12-29 20:43
by toppas72
hallo zusammen,

vielleicht hat mir jemand einen tipp, ich sehe von lauter bäumen den wald nicht mehr
ich habe einen debian-server mit confixx am laufen. openwebmail installiert und in der /etc/apache/httpd.conf folg. zeile eingefügt:

Include /etc/openwebmail/apache.conf


die apache.conf im /etc/openwebmail/ sieht so aus:
____________________________________

Alias /openwebmail /usr/share/openwebmail

<Directory /usr/share/openwebmail>
Options FollowSymLinks
</Directory>


<VirtualHost 80.123.123.123>
DocumentRoot /usr/share/openwebmail
DirectoryIndex /cgi-bin/openwebmail/openwebmail.pl
ServerName webmail.meinedomain.de
</VirtualHost>
____________________________________

so läuft auch alles wunderbar. openwebmail funkt. via http://webmail.meinedomain.de

jedoch ist diese variante echt mühsam, da ich für jede domain einen eintrag erstellen muss. daher wollte ich, das openwebmail via http://www.meinedomain.de/openwebmail erreichbar ist.

jetzt egal was ich einstelle Alias, ScriptAlias usw. wenn ich openwebmail via http://www.meinedomain.de/openwebmail aufrufen will, leitet er zwar auf /cgi-bin/openwebmail/openwebmail.pl um aber es kommt einen fehler das er den script nicht finden kann.

der apache log, zeigt mir:

script not found or unable to stat: /var/www/web1/html/cgi-bin/openwebmail

vielleicht hat jemand einen tipp? vielen dank


gruss
toppas

Re: Apache ScriptAlias für Openwebmail

Posted: 2003-12-30 19:44
by pollux
Hi,

kann es sein, daß die Openwebmail/apache.conf nach Deinen VHost-Definitionen eingebunden wird? Es sieht nämlich so aus, als ob beim Aufruf über meinedomain.de/openwebmail gar kein Alias berücksichtigt wird. Sonst müsste da irgendwas stehen von "cannot stat script /usr/share/openwebmail/...".

Grüße

Pollux

Re: Apache ScriptAlias für Openwebmail

Posted: 2003-12-30 23:30
by toppas72
auch wenn es vor des confixx eintrag in httpd.conf ist bekomme ich:

script not found or unable to stat: /var/www/web1/html/cgi-bin/openwebmail

:(


gruss
toppas

Re: Apache ScriptAlias für Openwebmail

Posted: 2003-12-30 23:35
by Matthias Diehl
Kann sein, dass ich dein Problem falsch verstanden habe, aber vielleicht hilft es Dir ja, einen Eintrag in der httpd.conf zu machen, der für alle Subdomains gültig ist ?

Das ginge z.B. mit

Code: Select all

ServerAlias webmail.*
denke ich

Re: Apache ScriptAlias für Openwebmail

Posted: 2003-12-31 00:01
by pollux
Poste doch bitte den VHost, aus dem das aufgerufen werden soll. Also z.B. den für http://www.meinedomain.de.
Und alle Alias, Scriptalias und DirectoryIndex-Einträge in der httpd.conf und den abhängigen Dateien.

Re: Apache ScriptAlias für Openwebmail

Posted: 2003-12-31 09:49
by toppas72
meine /etc/apache/httpd.conf:
_________________________________________________

Include /etc/phpmyadmin/apache.conf

## CONFIXX
<Directory "/var/www/confixx/html">
AllowOverride all
</Directory>
<VirtualHost 80.123.123.123:80>
ServerName srv1.meinedomain.de
#User confixx
#Group users
DocumentRoot /var/www/confixx/html
php_admin_value safe_mode_exec_dir /var/www/confixx/bin
php_admin_value upload_tmp_dir /var/www/confixx/tmp
ScriptAlias /cgi-bin/ /var/www/confixx/html/cgi-bin/
CustomLog /var/log/apache/srv1.meinedomain.de_access.log "%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i""
ErrorLog /var/log/apache/srv1.meinedomain.de_error.log
</VirtualHost>
Include /etc/apache/confixx_vhost.conf
# ^- Dieser Eintrag sollte unbedingt am Ende der Datei bleiben
## /CONFIXX

Include /etc/openwebmail/apache.conf
_________________________________________________




meine /etc/apache/confixx_vhost.conf:
_________________________________________________

#### CONFIXX APACHE VHOST FILE ####
### created Wed Dec 31 10:17:01 2003 ###

NameVirtualHost 80.123.123.123:80
php_admin_flag safe_mode On
php_admin_value safe_mode_exec_dir /var/www/empty

UseCanonicalName Off
LogFormat "%V:#:%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"" confixx
LogFormat "%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"" confixx2
CustomLog |/root/confixx/pipelog.pl confixx
<Directory "/var/www">
<Files ~ "^.ht">
deny from all
</Files>
AllowOverride None
AllowOverride Indexes AuthConfig Limit FileInfo
Options None
Options -FollowSymLinks -SymLinksIfOwnerMatch +Includes
</Directory>

<VirtualHost 80.123.123.123:80>
ServerName meinedomain.de
ServerAlias http://www.meinedomain.de
DocumentRoot /var/www/web1/html
User web1
Group ftponly
ScriptAlias /cgi-bin/ /var/www/web1/html/cgi-bin/
php_admin_value open_basedir /var/www/web1/
php_admin_value upload_tmp_dir /var/www/web1/phptmp/
</VirtualHost>
_________________________________________________




meine /etc/openwebmail/apache.conf:
_________________________________________________

Alias /openwebmail /usr/share/openwebmail

<Directory /usr/share/openwebmail>
Options FollowSymLinks
</Directory>

<VirtualHost 80.123.123.123>
DocumentRoot /usr/share/openwebmail
DirectoryIndex /cgi-bin/openwebmail/openwebmail.pl
ServerName webmail.meinedomain.de
</VirtualHost>
_________________________________________________


die obenwebmail seiten befinden sich unter:
/usr/share/openwebmail

und die openwebmail scripts unter:
/usr/lib/cgi-bin/openwebmail/


vielen dank an alle
toppas

Re: Apache ScriptAlias für Openwebmail

Posted: 2003-12-31 14:09
by pollux
Hi,

ich glaube, ich habe den Fehler gefunden. Du schreibst
leitet er zwar auf /cgi-bin/openwebmail/openwebmail.pl um
Und genau das ist das Problem. Klar? :?:
Denn:
Du rufst http://www.meinedomain.de/openwebmail auf. Das greift dank des Aliases

Code: Select all

Alias /openwebmail /usr/share/openwebmail
auf /usr/share/openwebmail/index.html o.ä. zu. Diese index.html leitet weiter (s.o.) nach http://www.meinedomain.de/cgi-bin/openw ... webmail.pl Und das wird der Apache wg.

Code: Select all

ScriptAlias /cgi-bin/ /var/www/web1/html/cgi-bin/
auflösen zu /var/www/web1/html/cgi-bin/openwebmail/openwebmail.pl
Da es aber das Verzeichnis openwebmail nicht gibt, kommt ein Fehler.
Lösung:
Entweder Du machst die Openwebmailskripte in den gleichen Ordner wie die Openwebmail html-Sachen.
oder:
Du fügst einfach folgenden ScriptAlias in die Openwebmail.conf ein:

Code: Select all

Scriptalias /cgi-bin/openwebmail/ /usr/lib/cgi-bin/openwebmail/
Ich bin gespannt, ob das klappt.

Viele Grüße und einen guten Rutsch

Pollux

Re: Apache ScriptAlias für Openwebmail

Posted: 2003-12-31 16:06
by toppas72
danke pollux, du hast genau das problem gefunden, jedoch funkt. es immer noch nicht :(

jetzt bekomme ich wenigstens im /var/log/apache/access.log ein:

GET /cgi-bin/openwebmail/openwebmail.pl HTTP/1.1" 403 244

aber eben forbidden. bleibt mir wohl nichts mehr übrig als openwebmail-seiten da rein zu kopieren.

anyway vielen dank und happy new year
toppas