Bonjour
Problème :
Je développe un site en local sous wamp (Windows 7).
Je souhaite créer un virtual host, manipulation que j'ai déjà réalisée plusieurs fois sans problème par le passé.
Mais aujourd'hui, impossible. J'ai retourné le problème dans tous les sens et je n'arrive pas à faire mon hôte virtuel
Manipulations effectuées :
Fichier C:\Windows\System32\drivers\etc\hosts
Il y a uniquement 2 lignes actives (non commentés) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 127.0.0.1 localhost 127.0.0.1 agc.dev
Fichier C:\wamp\bin\apache\apache2.2.22\conf\http.conf
Lignes actives :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126 ServerRoot "c:/wamp/bin/apache/apache2.2.22" Listen 80 LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule asis_module modules/mod_asis.so LoadModule auth_basic_module modules/mod_auth_basic.so LoadModule authn_default_module modules/mod_authn_default.so LoadModule authn_file_module modules/mod_authn_file.so LoadModule authz_default_module modules/mod_authz_default.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule cgi_module modules/mod_cgi.so LoadModule dir_module modules/mod_dir.so LoadModule env_module modules/mod_env.so LoadModule include_module modules/mod_include.so LoadModule isapi_module modules/mod_isapi.so LoadModule log_config_module modules/mod_log_config.so LoadModule mime_module modules/mod_mime.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule php5_module "c:/wamp/bin/php/php5.4.3/php5apache2_2.dll" <IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> User daemon Group daemon </IfModule> </IfModule> ServerAdmin admin@localhost ServerName localhost:80 DocumentRoot "c:/wamp/www/" <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "c:/wamp/www/"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all Allow from localhost ::1 127.0.0.1 </Directory> <IfModule dir_module> DirectoryIndex index.php index.php3 index.html index.htm </IfModule> <FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch> ErrorLog "c:/wamp/logs/apache_error.log" LogLevel warn <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog "c:/wamp/logs/access.log" common </IfModule> <IfModule alias_module> ScriptAlias /cgi-bin/ "cgi-bin/" </IfModule> <IfModule cgid_module> </IfModule> <Directory "cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> DefaultType text/plain <IfModule mime_module> TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 </IfModule> Include conf/extra/httpd-autoindex.conf Include conf/extra/httpd-vhosts.conf <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> Include "c:/wamp/alias/*"
Fichier C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf
Lignes actives :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:/wamp/www" ServerName localhost ServerAlias 127.0.0.1 <Directory "C:/wamp/www"> Options Indexes FollowSymLinks MultiViews AllowOverride All </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/wamp/www/AGC" ServerName agc.dev ServerAlias www.agc.dev <Directory "C:/wamp/www/AGC"> AllowOverride All Require local </Directory> </VirtualHost>
Les logs d'apache :
Error Log :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 [Mon Jul 15 11:26:29 2013] [notice] Apache/2.2.22 (Win64) PHP/5.4.3 configured -- resuming normal operations [Mon Jul 15 11:26:29 2013] [notice] Server built: May 13 2012 19:41:17 [Mon Jul 15 11:26:29 2013] [notice] Parent: Created child process 7060 [Mon Jul 15 11:26:29 2013] [notice] Child 7060: Child process is running [Mon Jul 15 11:26:29 2013] [notice] Child 7060: Acquired the start mutex. [Mon Jul 15 11:26:29 2013] [notice] Child 7060: Starting 64 worker threads. [Mon Jul 15 11:26:29 2013] [notice] Child 7060: Starting thread to listen on port 80. [Mon Jul 15 11:26:29 2013] [notice] Child 7060: Starting thread to listen on port 80.
Access log :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 no-body - - [15/Jul/2013:11:36:57 +0200] "GET / HTTP/1.1" 200 9276 no-body - - [15/Jul/2013:11:36:57 +0200] "GET /index.php?img=gifLogo HTTP/1.1" 200 4549 no-body - - [15/Jul/2013:11:36:57 +0200] "GET /index.php?img=pngWrench HTTP/1.1" 200 741 no-body - - [15/Jul/2013:11:36:57 +0200] "GET /index.php?img=pngFolder HTTP/1.1" 200 850 no-body - - [15/Jul/2013:11:36:57 +0200] "GET /index.php?img=pngPlugin HTTP/1.1" 200 548 no-body - - [15/Jul/2013:11:36:57 +0200] "GET /index.php?img=pngFolderGo HTTP/1.1" 200 694 no-body - - [15/Jul/2013:11:36:58 +0200] "GET / HTTP/1.1" 200 9276 no-body - - [15/Jul/2013:11:36:58 +0200] "GET /index.php?img=gifLogo HTTP/1.1" 200 4549 no-body - - [15/Jul/2013:11:36:58 +0200] "GET /index.php?img=pngFolder HTTP/1.1" 200 850 no-body - - [15/Jul/2013:11:36:58 +0200] "GET /index.php?img=pngPlugin HTTP/1.1" 200 548 no-body - - [15/Jul/2013:11:36:58 +0200] "GET /index.php?img=pngWrench HTTP/1.1" 200 741 no-body - - [15/Jul/2013:11:36:58 +0200] "GET /index.php?img=pngFolderGo HTTP/1.1" 200 694
Résultats :
L'accès à localhost et à 127.0.0.1 dans mon navigateur marche nickel.
En revanche, lorsque je tape agc.dev/ je me retrouve avec l'erreur Petit problème... Google Chrome n'est pas parvenu à trouver la page agc.dev.
Même problème sous Firefox avec Adresse introuvable.
Idem avec autres navigateurs.
Edit: Je précise aussi que lorsque j'accède au projet par le localhost http://localhost/AGC, ça marche très bien.
Merci d'avance.
Partager