PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Domain wechsel - Apache macht das nicht mit ?



verve
24.06.04, 13:59
Hi@all,

hatte meinen Server nun die ganze Zeit über eine Subdomain laufen.
Nun habe ich eine richtige Domain, welche auf meinen Server weiterleitet.
Habe Debian auf dem Server mit Apache. Dort habe ich unter ServerName nun meine richtige Domain eingetragen.
Wenn ich jetzt aber auf diese Domain gehe, wird weitergeleitet auf die IP (ist normal) und von der IP aber wieder auf die alte Subdomain :confused: :confused:

Ich habe in der httpd.conf nirgendswo mehr die alte Subdomain stehen, wie kommt apache den noch darauf von der IP auf die Subdomain weiterzuleiten ?

Wird das vielleicht noch irgendwo eingetragen oder gespeichert?

hat da vielleicht jemand ne idee?

greetings
verve

Doh!
24.06.04, 14:11
Bitte httpd.conf ohne Kommentare posten

verve
24.06.04, 14:22
oh .. klar :) hier:

ServerType standalone
ServerRoot "/usr/local/apache"
#LockFile /usr/local/apache/logs/httpd.lock
PidFile /usr/local/apache/logs/httpd.pid
ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard
#ResourceConfig /usr/local/apache/conf/srm.conf
#AccessConfig /usr/local/apache/conf/access.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
#Listen 3000
#Listen 12.34.56.78:80
#BindAddress *
Port 80
User www
Group nogroup
ServerAdmin user@ip.domain.com
ServerName www.domain.de
DocumentRoot "/usr/local/apache/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/usr/local/apache/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
#<Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php index.php3 index.php4 index.pl index.cgi
</IfModule>
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
#CacheNegotiatedDocs
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig /usr/local/apache/conf/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/apache/conf/magic
</IfModule>
HostnameLookups Off
ErrorLog /usr/local/apache/logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /usr/local/apache/logs/access_log common
#CustomLog /usr/local/apache/logs/referer_log referer
#CustomLog /usr/local/apache/logs/agent_log agent
#CustomLog /usr/local/apache/logs/access_log combined
ServerSignature On

<IfModule mod_alias.c>
Alias /icons/ "/usr/local/apache/icons/"

<Directory "/usr/local/apache/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /manual/ "/usr/local/apache/htdocs/manual/"

<Directory "/usr/local/apache/htdocs/manual">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

</IfModule>
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif

ReadmeName README
HeaderName HEADER

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

</IfModule>

<IfModule mod_mime.c>

AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-TW .zh-tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8

<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
</IfModule>

AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz

#AddType application/x-compress .Z
#AddType application/x-gzip .gz .tgz

#AddHandler cgi-script .cgi

#AddType text/html .shtml
#AddHandler server-parsed .shtml

#AddHandler send-as-is asis
#AddHandler imap-file map
#AddHandler type-map var

</IfModule>
#MetaDir .web
#MetaSuffix .meta

<IfModule mod_setenvif.c>

BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

</IfModule>

#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>

#<Location /cgi-bin/phf*>
# Deny from all
# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
#</Location>

#NameVirtualHost *:80

#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

AddHandler cgi-script .cgi
AddType text/html .shtml
AddHandler server-parsed .shtml

####### Mod Layout #########
# http://www.tangent.org/mod_layout/
<Virtualhost *>
DocumentRoot /usr/local/apache/htdocs
LayoutFooter /root/bin/test.html
# LayoutHeader /header.php
# LayoutHandler application/x-httpd-php
# LayoutHandler application/x-httpd-php3
# LayoutHandler application/x-httpd-php3-source
# LayoutHandler httpd/unix-directory
# LayoutMerge On
# LayoutIgnoreURI *.rss
# LayoutIgnoreURI *.css
</virtualhost>
############################

############## PHP 4.3.4 ####################
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
############################################

############## rewrirte ###################
#RewriteEngine on
#RewriteMap lb prg:/root/bin/lb.pl
#RewriteRule ^/(.+)$ ${lb:$l} [P,L]
#########################################


hoffe ihr blickt da ohne kommentare durch :)

greetings
verve

Doh!
24.06.04, 14:34
Die Konfig scheint ok, dann muss es an den Webseiten liegen. Habe ich das richtig verstanden, dass Du irgendwo im Netz eine Webseite hast, die auf einen bei Dir stehenden Server ein redirect macht? Und dieser Server wiederrum redirectet zurück?

verve
24.06.04, 14:43
Hi,

also meine alte Subdomain wurde von nem anderen Server aus per Rewrite erstellt, nicht per redirect:


#<virtualhost *>
#servername subdomain.domain.de
#RewriteEngine On
#RewriteRule ^/(.*) http://IP-ADRESSE/$1 [P]
#</virtualhost>


das habe ich nun aber alles deaktiviert, selbst der apache der dies drin hatte ist nun aus, trotzdem versucht er immer noch auf diese Subdomain zu zu greifen.

Kann es etwas damit zu tun haben ?
greetings
verve

Doh!
24.06.04, 14:48
Ich verstehe immer noch net ganz, wo welche Domain gehostet ist. War alles schon immer bei Dir oder auf zwei unterschiedlichen Rechnern

verve
24.06.04, 15:00
also hatte ersteinmal nur einen Server: Server1 mit einer Domain
Dann hab ich nen zweiten Server bekommen: Server2 ohne Domain

Dann habe ich mittels Rewrite auf Server1 eine Subdomain erstellt zu Server2.

Das ganze hat mir aber nicht so gefallen :) also hab ich die Domain von Server1 zu Server2 umleiten lassen.
Also hat jetzt Server 2 die Domain von Server1 und Server1 hat keine Domain mehr.

Das Problem: Jetzt geht gar nichts mehr :eek:

Bei Server1 möchte der Apache nicht mehr starten:

Starting httpd [ PHP4 SSL ][Thu Jun 24 14:58:50 2004] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
failed

und wenn man nun auf die Domain von Server2 geht, wird halt weitergeleitet auf die Ip-Adresse von Server2, diese Leitet dann aber weiter zur alten Subdomain, welche gar nicht exestiert. Das kann doch eigentlich nur Apache machen, oder? Aber in der conf steht niergends etwas davon.

verzweilend ... :rolleyes:

greetings
verve

Doh!
24.06.04, 15:13
Wie ist denn der DNS geregelt, steht der bei Dir oder beim Provider?

verve
24.06.04, 15:17
ich hab nie eine konfigurationen am DNS durchgenommen, der müßte beim Provider sein.

Doh!
24.06.04, 15:32
Da könnte der Hund begraben liegen. Weißt Du wie man eine DNS-Konfiguration überprüft? (dig, nslookup usw)

verve
24.06.04, 15:37
nein, hab hier im Forum mal folgende URL empfohlen bekommen: www.dnsstuff.com
aber wirklich was anfangen kann ich damit nicht :rolleyes: