It seems, that i cannot configure apache to use a few DNSes.

Support for webhosts that use CentOS
Post Reply
newn
Posts: 17
Joined: 2010/06/20 10:12:54

It seems, that i cannot configure apache to use a few DNSes.

Post by newn » 2010/07/09 11:31:45

[code]<VirtualHost www.example.com:80 example.com:80>
ServerName www.example.com
DocumentRoot "/var/www/example.com/htdocs"
ScriptAlias /cgi-bin/ /var/www/example.com/cgi-bin/
# Alias /phpmyadmin/ /var/www/phpmyadmin/

<Directory />
Options -Indexes
AllowOverride All
Order Deny,Allow
Deny from all
</Directory>

<Directory "/var/www/example.com/htdocs">
Options -Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<Directory "/var/www/example.com/cgi-bin">
Options -Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>

RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
RewriteRule ^(.*)index\.html$ http://www.example.com$1 [R=301,L]

ErrorLog /var/log/httpd/error_log
#CustomLog /var/log/httpd/www.example.com_access_log combined env=!gif-image
#AddType text/html .shtml
#AddHandler server-parsed .shtml
</VirtualHost>
[/code]

Changed all those examples into my DNS, which is rotated to this computer's name servers 9it's a VDS) and getting this error, when restarting apache:

Starting httpd: [Fri Jul 09 14:24:37 2010] [error] (EAI 2)Name or service not known: Could not resolve host name example.co.cc -- ignoring!
[Fri Jul 09 14:24:39 2010] [error] (EAI 2)Name or service not known: Could not resolve host name example.co.cc -- ignoring!

(example is the other word, which should be my dns, it ends with co.cc).

hansolo
Posts: 231
Joined: 2010/01/13 11:17:42
Location: SI

It seems, that i cannot configure apache to use a few DNSes.

Post by hansolo » 2010/08/26 20:49:03

If you host the domains 'example.co.cc' www sites on the server and DNS server is not the same then it show the error.

This would not show if you have DNS hosted on the same server as Apache.

hansolo
Posts: 231
Joined: 2010/01/13 11:17:42
Location: SI

Re: It seems, that i cannot configure apache to use a few DNSes.

Post by hansolo » 2010/10/29 12:42:40

.... or you wait until your server gets DNS addresses for those VirtualHost names to get it working.
First try 'nslookup example.co.cc' if your server can find it. Then don't worry about these errors as

Post Reply

Return to “CentOS 5 - Webhosting Support”