Pages : 1
#1 Le 30/01/2013, à 06:27
- Totof08170
Soucis Vhost Apache 2
Bonjour tout le monde,
Voila j'ai un petit soucis, je ne trouve pas la réponse pour le moment.
J'ai installer apache2 sur mon serveur, dans le dossier /var/www j'ai un dossier default-site et un thomassciot
Dans sites-available j'ai mon default, default-ssl et thomassciot.net
Le fichier default est :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/default-site
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/default-site>
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>
et le fichier thomassciot est donc
<VirtualHost *:80>
ServerAdmin postmaster@thomassciot.net
ServerName www.thomassciot.net
ServerAlias *.thomassciot.net
DocumentRoot /var/www/thomassciot/
<Directory /var/www/thomassciot/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
ServerSignature Off
</VirtualHost>
Bien sur je n'ai pas oublier les commandes
a2ensite thomassciot.net
apache2ctl restart
Lorsque que je tape l'ip du serveur, je tombe directement dans la page it's work ( ah oui j'ai déplacer le fichier html de base de apache dans le dossier /var/www/default-site ) donc je suppose que pour le moment tout est normale.
Seul soucis, dans l'url lorsque je tape thomassciot.net la je ne tombe sur rien.
J'ai modifier le fichier host de ma machine cliente en ajoutant :
thomassciot.net ip_du_server
Et sur le serveur j'ai rajouter dans httpd.conf :
ServerName 127.0.0.1
Et la on vois bien que mon client fait une demande pour le nom, mais pas de réponse.
Quelqu'un pourrais me donner une petite piste?
Hors ligne
#2 Le 30/01/2013, à 07:56
- Totof08170
Re : Soucis Vhost Apache 2
Je viens de mettre bind sur le serveur, histoire d'y arriver un peut mieux, par contre j'obtiens ceci :
root [/etc/bind] > nano db.thomassciot.net.inv
root [/etc/bind] > named-checkzone thomassciot.net /etc/bind/db.thomassciot.net
zone thomassciot.net/IN: loaded serial 2
OK
root [/etc/bind] > named-checkzone thomassciot.net /etc/bind/db.thomassciot.net.inv
/etc/bind/db.thomassciot.net.inv:4: no TTL specified; using SOA MINTTL instead
zone thomassciot.net/IN: loaded serial 1
OK
root [/etc/bind] > named-checkzone /etc/bind/named.conf
usage: named-checkzone [-djqvD] [-c class] [-f inputformat] [-F outputformat] [-t directory] [-w directory] [-k (ignore|warn|fail)] [-n (ignore|warn|fail)] [-m (ignore|warn|fail)] [-r (ignore|warn|fail)] [-i (full|full-sibling|local|local-sibling|none)] [-M (ignore|warn|fail)] [-S (ignore|warn|fail)] [-W (ignore|warn)] [-o filename] zonename filename
root [/etc/bind] > named-checkzone /etc/bind/named.conf.options
usage: named-checkzone [-djqvD] [-c class] [-f inputformat] [-F outputformat] [-t directory] [-w directory] [-k (ignore|warn|fail)] [-n (ignore|warn|fail)] [-m (ignore|warn|fail)] [-r (ignore|warn|fail)] [-i (full|full-sibling|local|local-sibling|none)] [-M (ignore|warn|fail)] [-S (ignore|warn|fail)] [-W (ignore|warn)] [-o filename] zonename filename
Fichier db.thomassciot.net :
; BIND data file for eth0 interface
;
$TTL 604800
@ IN SOA dns01.thomassciot.net. root.thomassciot.net. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dns01.thomassciot.net.
dns01 IN A 192.168.1.58
Fichier db.thomas.sciot.inv :
;
; BIND reverse data file for eth0 interface
; $TTL 604800
@ IN SOA dns01.thomassciot.net. root.thomassciot.net. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dns01.
230 IN PTR dns01.thomassciot.net
Fichier named.conf.default-zones :
// 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";
};
zone "thomassciot.net" {
type master;
file "/etc/bind/db.thomassciot.net";
forwarders{};
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.thomassciot.net.inv";
forwarders{};
};
y aurait-il un soucis de ce coté la ?
PS : Pour le DNS apparement j'ai réussi a résoudre le soucis, en faite ma machine s'appelais debian, du coup j'ai modifier les dns01 en debian
C:\Users\Totof>nslookup debian.thomassciot.net
58.1.168.192.in-addr.arpa
primary name server = debian.thomassciot.net
responsible mail addr = root.thomassciot.net
serial = 1
refresh = 604800 (7 days)
retry = 86400 (1 day)
expire = 2419200 (28 days)
default TTL = 604800 (7 days)
Serveur : UnKnown
Address: 192.168.1.58
Nom : debian.thomassciot.net
Address: 192.168.1.58
Me reste plus cas regler le soucis pour pouvoir acceder au serveur apache avec le nom de domaine thomassciot.net
PS : ça y est ça fonctionne, dans la vhost j'ai préciser thomassciot.net:80 et ça fonctionne bien
Dernière modification par Totof08170 (Le 30/01/2013, à 08:48)
Hors ligne
Pages : 1