0
votes

I tried to add an second Domain to my dedicated server. My standard domain 1 should connect to normal /var/www/ path and my second domain should point to /var/www/domain.

Changed some thing (see comments) and now I get an 404 Error

My enabled sites configs look like:

default domain:

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>

second domain:

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

hosts Document:

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 k4lim
::1 localhost

127.0.0.1       localhost
127.0.0.1       domain1.name
185.101.92.XXX  domain2.name

T he error I get when I try to open the site in Firefox is: The DNS Adress of the domain could not be found.

Would be really thankful for any ideas and help!

2

2 Answers

1
votes
  1. Does nslookup domain2.name show the right IP address?
  2. Does ping domain2.name show the right IP address?
  3. Is it a local or a world wide domain? If local you have to ask your local dns admin to add it.
  4. Alternatively you can add it to /etc/hosts on your local machine. Not on the server.
  5. Have a look at cat /etc/resolv.conf if the right dns server is listet.
  6. If it's a global domain: Is there a connection to the outside?
1
votes

I just found my problem:

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

I forgot the /var/.... before /www/domain