PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Fehler in Apache Konfiguration



schani
15.06.10, 11:00
Hallo,

ich kämpfe gerade an einer Apache2 Konfiguration:
Apache 2.2.9 Worker FastCGI, Debian Lenny, PHP5.3.2, MySQL, nss-mysql
Ich möchte auf dem Server als Control Panel SYSCP einsetzten was auch bereits gut funktioniert. Allerdings kapiere ich die Konfiguration des Apachen nicht ganz. Was aber nicht an SYSCP liegt.

Derzeit gibt es nur eine einfache Konfig mit nur 2 Domains. Nach dem restart des Apche2 wird mir folgende Meldung angegeben:


/etc/init.d/apache2 restart
Restarting web server: apache2[Tue Jun 15 11:36:55 2010] [warn] NameVirtualHost 12.34.56.78:80 has no VirtualHosts
[Tue Jun 15 11:36:55 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting ..[Tue Jun 15 11:36:58 2010] [warn] NameVirtualHost 12.34.56.78:80 has no VirtualHosts
[Tue Jun 15 11:36:58 2010] [warn] NameVirtualHost *:80 has no VirtualHosts


Als Resultat werden alle Domains die auf den Server zeigen auf die /var/www/syscp umgeleitet. Alle angelegten Virtual Domain in sites-enabled werden nicht berücksichtigt.

Hier mal die config Files auf das notwendigste reduziert:



apache2.conf:

PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf

# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

Soweit nichts ungewöhnliches


Eingebundenes httpd.conf als "Haupt Domain"

ServerName dsxxx.dedicated.hosteurope.de
ServerPath http://dsxxx.dedicated.hosteurope.de
ServerAdmin schani@domain.de

NameVirtualHost 12.34.56.78:80

<VirtualHost 12.34.56.78:80>

ServerName syscp.domain.de
ServerAdmin schani@domain.de

DocumentRoot /var/www/syscp

<Directory "/var/www/syscp">
FCGIWrapper /var/www/php-fcgi-scripts/syscplocal/php-fcgi-starter .php
AddHandler fcgid-script .php
Options +FollowSymLinks -MultiViews +ExecCGI
AllowOverride AuthConfig FileInfo
</Directory>

SuexecUserGroup syscplocal syscplocal

</VirtualHost>

Dieser Virtuelle Host wird also beachtet. Und auch das übergeben der User/Group per nss funktioniert soweit.

Und hier die Virtuellen Hosts die nicht beachtet werden und den Fehler auslösen:


Datei 20_syscp_normal_vhost_domain1.de.conf in sites-enabled
# Created 12.06.2010 15:13
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

# Domain ID: 13 - CustomerID: 1 - CustomerLogin: leicht
<VirtualHost 12.34.56.78:80>
ServerName domain1.de
ServerAlias www.domain1.de
ServerAdmin schani@domain1.de
DocumentRoot "/home/httpd/webs/leicht/domain1.de/"
SuexecUserGroup "leicht" "leicht"
<Directory "/home/httpd/webs/leicht/domain1.de/">
AddHandler fcgid-script .php
FCGIWrapper /var/www/php-fcgi-scripts/leicht/domain1.de/php-fcgi-starter .php
Options +ExecCGI
</Directory>
Alias /webalizer "/home/httpd/webs/leicht/webalizer"
# AWStats statistics
RewriteEngine On
RewriteRule ^/awstats(/.*)? /awstats/awstats.pl?config=domain1.de [L,PT]
RewriteRule ^/awstats.pl(.*)* /awstats/awstats.pl$1 [QSA,L,PT]
ErrorLog "/home/httpd/logs/leicht-error.log"
CustomLog "/home/httpd/logs/leicht-access.log" combined
# an alle domains /webmail anhaengen
Alias /webmail/ "/var/www/roundcube"
Alias /webmail" /var/www/roundcube"
<Directory "/var/www/roundcube">
Options ExecCGI
AllowOverride None
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>

</VirtualHost>



Noch eine 2. Domain die nicht funktioniert:


# 20_syscp_normal_vhost_domain2.de.conf
# Created 12.06.2010 15:13
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

# Domain ID: 14 - CustomerID: 1 - CustomerLogin: leicht
<VirtualHost 12.34.56.78:80>
ServerName domain2.de
ServerAlias www.domain2.de
ServerAdmin schani@domain2.de
DocumentRoot "/home/httpd/webs/leicht/domain2.de/"
SuexecUserGroup "leicht" "leicht"
<Directory "/home/httpd/webs/leicht/domain2.de/">
AddHandler fcgid-script .php
FCGIWrapper /var/www/php-fcgi-scripts/leicht/domain2.de/php-fcgi-starter .php
Options +ExecCGI
</Directory>
Alias /webalizer "/home/httpd/webs/leicht/webalizer"
# AWStats statistics
RewriteEngine On
RewriteRule ^/awstats(/.*)? /awstats/awstats.pl?config=domain2.de [L,PT]
RewriteRule ^/awstats.pl(.*)* /awstats/awstats.pl$1 [QSA,L,PT]
ErrorLog "/home/httpd/logs/leicht-error.log"
CustomLog "/home/httpd/logs/leicht-access.log" combined
# an alle domains /webmail anhaengen
Alias /webmail/ "/var/www/roundcube"
Alias /webmail" /var/www/roundcube"
<Directory "/var/www/roundcube">
Options ExecCGI
AllowOverride None
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>

</VirtualHost>

Ich habe bereits meine Apache Bücher durchstöbert und auch gegooglet, aber mir erschließt sich nicht ganz wie ich die VirtualHost, ServerName und NamedHosts setzten muss damit alles passt.

Könnt Ihr mir da helfen und sagen was ich falsch mache.

Besten Dank


Christian