exponator
12.01.13, 02:30
Moin Leute
Mein Prob auf jetzt opensuse 12.2 liegt beim Apache Server.
Ich hatte zuvor nur einen Host. Das lief so prima, dass ich mir dachte einen weiteren Host als virtuellen Host anzulegen.
Ich habe nun einen virtuellen Host zusätzlich angelegt jedoch nun mit dem Fehler, dass ich, egal welche WWW-Adresse aufgerufen wird, immer auf dem virtuellen Host lande.
Die configs sind so eingestellt wie es viele Hilfeseiten -auch die von http://httpd.apache.org/docs/2.0/de/- ansagen.
Die Hauptdirektive liegt auf /srv/www/
Die VHosts-Direktive auf /srv/www/vhosts/
In den jeweiligen Unterordnern, die genauso lauten wie die Webadressen, liegen die Dateien der VHosts.
Selbst wenn ich die Web-IP-Adresse aufrufe lande ich auf dem VHost.
Normalerweise sollte es namenbasiert laufen, weil ich nur eine Netzwerkkarte habe.
Heißt:
Ich rufe eineadresse.tld auf und lande auf eineadresse.tld
Ich rufe andereadresse.tld auf und lande auf andereadresse.tld
Ich hoffe, das wurde soweit verstanden.
Leider läuft es momentan so, dass ich in beiden Fällen auf andereadresse.tld lande.
Meine configs:
/etc/apache2/httpd.conf
#
# /etc/apache2/httpd.conf
#
Include /etc/apache2/uid.conf
Include /etc/apache2/server-tuning.conf
ErrorLog /var/log/apache2/error_log
Include /etc/apache2/sysconfig.d/loadmodule.conf
Include /etc/apache2/listen.conf
Include /etc/apache2/mod_log_config.conf
Include /etc/apache2/sysconfig.d/global.conf
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf
Include /etc/apache2/mod_usertrack.conf
Include /etc/apache2/mod_autoindex-defaults.conf
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf
Include /etc/apache2/errors.conf
Include /etc/apache2/ssl-global.conf
<Directory "/">
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
DirectoryIndex index.html index.html.var
Include /etc/apache2/default-server.conf
Include /etc/apache2/sysconfig.d/include.conf
Include /etc/apache2/vhosts.d/*.conf
# SSLEngine off
UserDir "/srv/www/"
Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
ServerName pccenter24.ath.cx
HostNameLookups off
#NameVirtualHost *
/etc/apache2/listen.conf
#Listen 12.34.56.78:80
Listen 80
#Listen 443
<IfDefine SSL>
<IfDefine !NOSSL>
<IfModule mod_ssl.c>
Listen 443
</IfModule>
</IfDefine>
</IfDefine>
/etc/apache2/default-server.conf
#
# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.
#
DocumentRoot /srv/www
#
# Configure the DocumentRoot
#
<Directory "/srv/www">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#
Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
<Directory "/srv/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
#
<IfModule mod_userdir.c>
# Note that the name of the user directory ("public_html") cannot simply be
# changed here, since it is a compile time setting. The apache package
# would have to be rebuilt. You could work around by deleting
# /usr/sbin/suexec, but then all scripts from the directories would be
# executed with the UID of the webserver.
# The actual configuration of the directory is in
# /etc/apache2/mod_userdir.conf.
Include /etc/apache2/mod_userdir.conf
</IfModule>
#
Include /etc/apache2/conf.d/*.conf
# The manual... if it is installed ('?' means it won't complain)
Include /etc/apache2/conf.d/apache2-manual?conf
ServerAdmin ********@tld.net
/etc/apache2/vhosts/eineadresse.tld.conf
<VirtualHost *>
DocumentRoot /srv/www/vhosts/eineadresse.tld
ServerName eineadresse.tld
ServerAdmin ********@tld.net
ErrorLog /var/log/apache2/eineadresse.tld.error_log
CustomLog /var/log/apache2/eineadresse.tld.access_log combined
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
<Directory "/srv/www/vhosts/eineadresse.tld">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
Dementsprechend die zweite VHost im Ordner andereadresse.tld
Braucht Ihr noch mehr Infos? Sagt Bescheid.
Ich hab keine Ahnung was da falsch läuft. Unter opensuse 11.4 war alles OK.
Mein Prob auf jetzt opensuse 12.2 liegt beim Apache Server.
Ich hatte zuvor nur einen Host. Das lief so prima, dass ich mir dachte einen weiteren Host als virtuellen Host anzulegen.
Ich habe nun einen virtuellen Host zusätzlich angelegt jedoch nun mit dem Fehler, dass ich, egal welche WWW-Adresse aufgerufen wird, immer auf dem virtuellen Host lande.
Die configs sind so eingestellt wie es viele Hilfeseiten -auch die von http://httpd.apache.org/docs/2.0/de/- ansagen.
Die Hauptdirektive liegt auf /srv/www/
Die VHosts-Direktive auf /srv/www/vhosts/
In den jeweiligen Unterordnern, die genauso lauten wie die Webadressen, liegen die Dateien der VHosts.
Selbst wenn ich die Web-IP-Adresse aufrufe lande ich auf dem VHost.
Normalerweise sollte es namenbasiert laufen, weil ich nur eine Netzwerkkarte habe.
Heißt:
Ich rufe eineadresse.tld auf und lande auf eineadresse.tld
Ich rufe andereadresse.tld auf und lande auf andereadresse.tld
Ich hoffe, das wurde soweit verstanden.
Leider läuft es momentan so, dass ich in beiden Fällen auf andereadresse.tld lande.
Meine configs:
/etc/apache2/httpd.conf
#
# /etc/apache2/httpd.conf
#
Include /etc/apache2/uid.conf
Include /etc/apache2/server-tuning.conf
ErrorLog /var/log/apache2/error_log
Include /etc/apache2/sysconfig.d/loadmodule.conf
Include /etc/apache2/listen.conf
Include /etc/apache2/mod_log_config.conf
Include /etc/apache2/sysconfig.d/global.conf
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf
Include /etc/apache2/mod_usertrack.conf
Include /etc/apache2/mod_autoindex-defaults.conf
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf
Include /etc/apache2/errors.conf
Include /etc/apache2/ssl-global.conf
<Directory "/">
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
DirectoryIndex index.html index.html.var
Include /etc/apache2/default-server.conf
Include /etc/apache2/sysconfig.d/include.conf
Include /etc/apache2/vhosts.d/*.conf
# SSLEngine off
UserDir "/srv/www/"
Options ExecCGI FollowSymLinks Includes IncludesNOEXEC Indexes MultiViews SymLinksIfOwnerMatch
ServerName pccenter24.ath.cx
HostNameLookups off
#NameVirtualHost *
/etc/apache2/listen.conf
#Listen 12.34.56.78:80
Listen 80
#Listen 443
<IfDefine SSL>
<IfDefine !NOSSL>
<IfModule mod_ssl.c>
Listen 443
</IfModule>
</IfDefine>
</IfDefine>
/etc/apache2/default-server.conf
#
# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.
#
DocumentRoot /srv/www
#
# Configure the DocumentRoot
#
<Directory "/srv/www">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#
Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
<Directory "/srv/www/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
#
<IfModule mod_userdir.c>
# Note that the name of the user directory ("public_html") cannot simply be
# changed here, since it is a compile time setting. The apache package
# would have to be rebuilt. You could work around by deleting
# /usr/sbin/suexec, but then all scripts from the directories would be
# executed with the UID of the webserver.
# The actual configuration of the directory is in
# /etc/apache2/mod_userdir.conf.
Include /etc/apache2/mod_userdir.conf
</IfModule>
#
Include /etc/apache2/conf.d/*.conf
# The manual... if it is installed ('?' means it won't complain)
Include /etc/apache2/conf.d/apache2-manual?conf
ServerAdmin ********@tld.net
/etc/apache2/vhosts/eineadresse.tld.conf
<VirtualHost *>
DocumentRoot /srv/www/vhosts/eineadresse.tld
ServerName eineadresse.tld
ServerAdmin ********@tld.net
ErrorLog /var/log/apache2/eineadresse.tld.error_log
CustomLog /var/log/apache2/eineadresse.tld.access_log combined
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
<Directory "/srv/www/vhosts/eineadresse.tld">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
Dementsprechend die zweite VHost im Ordner andereadresse.tld
Braucht Ihr noch mehr Infos? Sagt Bescheid.
Ich hab keine Ahnung was da falsch läuft. Unter opensuse 11.4 war alles OK.