Problème avec le VirtualHost de mon serveur dédié pour qu'il reconnaisse le dns
B'jour M'sieur, 'Dame,
Voilà suite à l'installation d'un dédié, j'ai encore et toujours le même soucis (à chaque fois que j'installe un dédié) à savoir un virtualHost qui fonctionne. Pour l'instant j'ai édité mon "default" comme suit :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.sanary-animation.com
ServerAlias sanary-animation.com *.sanary-animation.com
DocumentRoot /var/www/sanary-animation
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/sanary-animation>
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 /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
J'ai lié le tout au dossier "sites-enabled" avec un "sudo a2ensite default"
J'ai reload apache2.
Et j'ai à l'adresse de l'url une belle page marquant que l'a page n'a pas été trouvée !
j'ai Bind d'installé et voici le named.conf :
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
include "/etc/bind/named.conf.local";
Dans /etc/bind
Il faut créer un fichier db.exemple.com (exemple) (ou copier en exemple)
$ttl 86400
exemple.com. IN SOA ksxxxx.kimsufi.com. webmaster.exemple.com. (
2008051802
# date de modification + un chiffre ↑
21600
3600
604800
86400
)
exemple.com. IN NS ksxxxx.kimsufi.com.
exemple.com. IN NS ns.kimsufi.com.
exemple.com. IN A xxx.xxx.xxx.xxx
Server IN A xxx.xxx.xxx.xxx
www IN A xxx.xxx.xxx.xxx
# ↑ les ports
les partie avec # sont à virer.
Ça doit ressemble un peu à ça.
Dans named.conf.local il faut ajouter :
zone "exemple.com" {
type master;
file "/etc/bind/db.exemple.com";
};
Faut relancer bind une fois que tout est bon.