Toon posts:

[Apache] ServerAlias, ene domein snel andere langzaam

Pagina: 1
Acties:

Verwijderd

Topicstarter
Voor een website die meerdere talen levert met het zelfde script gebruik ik ServerAlias.
Ik gebruik PHP om aan de hand van het domein (.nl, .com, .de of .fr) de taalfile die gebruikt moet worden te achterhalen.
Het werkt allemaal heel goed, alleen er is iets vreemds aan de hand.
Soms is de .nl bijna niet meer te bereiken terwijl de .com enorm snel draait.
De domeinen zijn allemaal bij de zelfde registrant geregistreerd met dezelfde DNS server.

Domeinen en IP veranderd.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<VirtualHost 12.345.67.890:80>
ServerAlias www.domain.com www.domain.nl www.domain.de www.domain.fr domain.nl domain.de domain.com domain.fr *.domain.com *.domain.nl *.domain.de *.domain.fr

    ServerName www.domain.com
    ServerAlias www.domain.com domain.com 
    ServerAdmin webmaster@domain.com
    DocumentRoot /home/admin/domains/domain.com/public_html
    ScriptAlias /cgi-bin/ /home/admin/domains/domain.com/public_html/cgi-bin/

    UseCanonicalName OFF

    User admin
    Group admin
    CustomLog /var/log/httpd/domains/domain.com.bytes bytes
    CustomLog /var/log/httpd/domains/domain.com.log combined
    ErrorLog /var/log/httpd/domains/domain.com.error.log

    <Directory /home/admin/domains/domain.com/public_html>
        Options +Includes -Indexes
    <IfModule !mod_suphp.c>
        php_admin_flag engine ON
        php_admin_flag safe_mode OFF
        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f admin@domain.com'

    </IfModule>
    <IfModule mod_suphp.c>
        suPHP_Engine ON
        suPHP_UserGroup admin admin
    </IfModule>
    </Directory>

</VirtualHost>

  • benoni
  • Registratie: November 2003
  • Niet online
Staat soms het ene domein wel en het andere niet in /etc/hosts?

  • silentsnake
  • Registratie: September 2003
  • Laatst online: 15-01 11:20
Klinkt als resolving probleempjes, gooi al je domeinen in je hosts file en kijk of je dan nogsteeds het probleem hebt.

Verwijderd

Topicstarter
Het enige wat in etc/hosts staat is het volgende:

code:
1
2
3
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost localhost.localdomain


Moet daar iets bij? En dan Apache restarten?

Verwijderd

Topicstarter
Ik heb ook nog de file host.conf:
code:
1
order hosts,bind


Ook is er nog een file hosts.allow in de map /etc, maar die is leeg.