qwertz1
Goto Top

Aufruf der Apache Default-Seite

Hallo,
ich habe ein Problem mit dem Aufruf von der Defaultseite vom Apache.
Ich habe zwei virtuelle Hosts: froxlor.test.de und abc.de. Beide Hosts laufen mit fcgid und Froxlor.
Jetzt gibt es noch zwei Domains(die dieselbe Adresse haben), die auf die Defaultseite /var/www/index.html gehen sollen. Leider habe ich das nicht hinbekommen. Die Adresse asd.de hat dieselbe IP wie froxlor.test.de und abc.de, aber geht dann auf abc.de und nicht auf die Default-Seite. Die Seite asd.de hat keinen virtuellen Host.
Kann mir da jemand einen Tip geben. Der Server ist ein Debian 7 mit Apache 2.2.

Das sind die Dateien unter /etc/apache2/sites-available.
abc.de:

<VirtualHost 10.211.55.13:80>
DocumentRoot "/var/customers/webs/abc/www/"
ServerName abc.de
ServerAlias *.abc.de
FcgidIdleTimeout 30
SuexecUserGroup "abc" "abc"
<Directory "/var/customers/webs/abc/www/">
Options -Indexes MultiViews FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
AddHandler fcgid-script .php
FcgidWrapper /var/www/php-fcgi-scripts/abc/abc.de/php-fcgi-starter .php
Options +ExecCGI
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel debug
</VirtualHost>

froxlor.test.de:

<VirtualHost 10.211.55.13:80>
DocumentRoot "/var/www/froxlor/"
ServerName froxlor.test.de
ServerAlias *.test.de
FcgidIdleTimeout 30
SuexecUserGroup "froxlorlocal" "froxlorlocal"
<Directory "/var/www/froxlor/">
AddHandler fcgid-script .php
FcgidWrapper /var/www/php-fcgi-scripts/froxlor.panel/froxlor.test.de/php-fcgi-starter .php
Options +ExecCGI
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel debug

</VirtualHost>

default:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

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

ErrorLog ${APACHE_LOG_DIR}/error.log

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


CustomLog ${APACHE_LOG_DIR}/access.log combined

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

</VirtualHost>

/etc/apache2/ports.conf:

NameVirtualHost 10.211.55.13:80
Listen 80

<IfModule mod_ssl.c>
          1. If you add NameVirtualHost *:443 here, you will also have to change
          2. the VirtualHost statement in /etc/apache2/sites-available/default-ssl
          3. to <VirtualHost *:443>
          4. Server Name Indication for SSL named virtual hosts is currently not
          5. supported by MSIE on Windows XP.
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>

Content-Key: 221576

Url: https://administrator.de/contentid/221576

Ausgedruckt am: 28.03.2024 um 22:03 Uhr

Mitglied: falscher-sperrstatus
falscher-sperrstatus 09.11.2013 um 14:06:33 Uhr
Goto Top
Hallo,

dann leg doch einen vHost dafür an?
DNS stimmt?

Beste Grüße,

Christian
Mitglied: qwertz1
qwertz1 10.11.2013 um 09:18:43 Uhr
Goto Top
Hallo,
mir geht es um Prinzip. Ich will, dass alle Domains, die auf die IP des Servers zeigen und keine virtuellen Host haben, auf eine Default-Seite umgeleitet werden.
DNS stimmt.
Mitglied: carg
carg 11.11.2013 um 16:31:59 Uhr
Goto Top
HI,

versuch doch mal ein apachectl -S in der Shell. Dann solltest Du sehen was der default host ist. Der wird genommen wenn nix sonstiges past.

Grüße
Mitglied: qwertz1
qwertz1 12.11.2013 um 09:18:48 Uhr
Goto Top
Hallo,
Danke für den Tip. Die Links in sites-enabled sind alpabetisch sortiert und der Apache nimmt immer den ersten Host auf der Liste. Also abc.de. Ich weiss, was ich jetzt machen muss. Danke.
Mitglied: carg
carg 12.11.2013 aktualisiert um 09:33:46 Uhr
Goto Top
Hi,

bitte - gerne.
Ich schreibe den default host immer in die httpd.conf vor dem Einbinden des site-enable Verweises.
Das schafft Klarheit face-wink

Grüße
Mitglied: SpeakerST
SpeakerST 06.01.2014 um 14:19:00 Uhr
Goto Top
Hallo,

du musst schauen das der vHost der auf die Default Seite zeigt oben steht. Um das Problm schnell zu lösen kannst du den Link in der enable einfach auf 000_site oder so setzten.

Wenn du dann die site_enable mit ls-all angezeigt bekommst müsste er oben stehen