Sponsor-Board.de

Normale Version: Apache 2 Virtueller Host
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hey SB Community,
ich wollte eben eine zweite Domain auf meinen vServer aufschlaten, habe jedoch das Problem, dass immer ein 404 Error kommt. Domain wurde bei namecheap gekauft und die DNS Einträge stimmen eigentlich auch.
Die erste Domain funktioniert (/var/www), die zweite (var/www/domain2) jedoch nicht.


Der Webserver läuft über Apache 2 und meine enabled-sites sehen so aus:

Standart domain:

Code:
<VirtualHost *:80>
    ServerAdmin [email protected]

    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

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

    CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>

zweite Domain:

Code:
<VirtualHost *:80>
    ServerName www.second-domain.net
    ServerAlias second-domain.net *.second-domain.net
    DocumentRoot /www/domain2
    </VirtualHost>


hosts Datei:

Code:
fe00::0         ip6-localnet
    ff00::0         ip6-mcastprefix
    ff02::1         ip6-allnodes
    ff02::2         ip6-allrouters

    127.0.0.1 localhost.localdomain localhost
    # Auto-generated hostname. Please do not remove this comment.
    2a06:1c40::xxx emptyx
    ::1 localhost

    127.0.0.1       localhost       domain1.name
    185.101.92.XXX  domain2.name


Würde mich sehr über Hilfe freuen, wenn weitere Infos benötigt werden, dann füge ich diese natürlich noch hinzu.

Emptyx schrieb:

Code:
DocumentRoot /www/domain


ob das mal so stimmt? müsste dieses nicht /var/www/domain sein?
Was gibt es denn für eine Fehlermeldung?

eplaytv schrieb:

Emptyx schrieb:

Code:
DocumentRoot /www/domain


ob das mal so stimmt? müsste dieses nicht /var/www/domain sein?
Was gibt es denn für eine Fehlermeldung?


Oh man, hat schon geholfen.. Danke dir!
Hatte auf stackoverflow schon ne Diskussion mit zig Kommentaren, aber niemand hats bemerkt Biggrin


#closed

Referenz-URLs