Bonjour,
je suis nouveaux né dans le domaine d'apache. Mon but est d'héberger deux sites sur la même adresse IP en les différenciant par les ports. une page web non sécurisé sur le port 80 qui redirige vers le serveur DAV en 443.
Pour ce faire, j'ai créé deux vhosts: httpd et vhost le premier est donc présenté comme suit:
le second, vhost, est configuré comme suit:Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 NameVirtualHost *:80 <VirtualHost *:80> ServerName yabedabedou.hd.free.fr DocumentRoot /home/yabeda/Apache/www CustomLog /var/log/apache/web combined SSLEngine Off <Directory "/home/yabeda/Apache/www/webnaver"> DirectoryIndex index.html index.htm index.php index.php3 index.php4 allow from all </Directory> ErrorLog /home/yabeda/Apache/www/log/errorlog LogLevel warn </VirtualHost>
Bien, j'ai beau me relire, je vois pas de fautes (marrant, c'est aussi ce que je disais a mes profs de français au collège!)Code:
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 NameVirtualHost *:443 <VirtualHost *:443> ServerName yabedabedou.hd.freebox.fr DocumentRoot /media/sdc1/Downloads/sabnzbd CustomLog /var/log/apache2/usenet.log combined SSLEngine On SSLCipherSuite ALL SSLCertificateFile /home/yabeda/Apache/SSLcert/server.crt SSLCertificateKeyFile /home/yabeda/Apache/SSLcert/server.key <Location /> Dav On DAVDepthInfinity On DavMinTimeout 600 AuthName "Salut" AuthUserFile /home/yabeda/Apache/Authentication/usenet.pwd AuthType Basic Require valid-user </Location> <IfModule mod_proxy.c> ProxyRequests Off <Proxy *> AddDefaultCharset off Order deny,allow Allow from all </Proxy> ProxyPass /sabnzbd http://localhost:7331/sabnzbd ProxyPassReverse /sabnzbd http://localhost:7331/sabnzbd </IfModule> </VirtualHost>
Bref, maintenant, les ports:
Enfin, apache2.conf:Code:
1
2
3
4
5 Listen 80 <IfModule mod_ssl.c> Listen 443 </IfModule>
Maintenant, lorsque je lance # /etc/init.d/apache2 startCode:
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 ServerName localhost ServerRoot "/etc/apache2" NameVirtualHost *:443 NameVirtualHost *:80 LockFile /var/lock/apache2/accept.lock PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 spare <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> <IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> <IfModule mpm_event_module> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> User www-data Group www-data AccessFileName .htaccess <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> DefaultType text/plain HostnameLookups Off ErrorLog /var/log/apache2/error.log LogLevel warn Include /etc/apache2/mods-enabled/*.load Include /etc/apache2/mods-enabled/*.conf Include /etc/apache2/httpd.conf Include /etc/apache2/vhost.conf Include /etc/apache2/ports.conf Forwarded-For}i LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined Include /etc/apache2/conf.d/ Include /etc/apache2/sites-enabled/
Ou lorsque je fais restart, je me retrouve avec:
et le seul log étant rempli est le error log avec une seul ligne:Code:
1
2
3
4 # /etc/init.d/apache2 start * Starting web server apache2 [Fri Mar 26 10:32:04 2010] [warn] NameVirtualHost *:80 has no VirtualHosts [Fri Mar 26 10:32:04 2010] [warn] NameVirtualHost *:443 has no VirtualHosts [fail]
J'ai donc effectué un chmod 777 sur tous les logs: ça n'a rien changéCode:Unable to open logs
Je me suis baladé sur pas mal de forum, tous ou presque relatent d'une duplicité des ports, du type:
Mais moi, il n'y a pas ça...Code:
1
2 Listen 80 Listen 80
Si ça peut aider, voici mon netstat:
Ah, j'allais oublier, je suis sur une ubuntu 9.10 IA64... mon kernel est le 2.6.31-20-genericCode:
1
2
3
4
5
6
7 # netstat -tinp Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 42720 0 0 0 94297 0 0 0 BMRU eth1 1500 0 0 0 0 0 0 0 0 0 BMU eth2 1500 0 0 0 0 0 0 6 0 0 BMU lo 16436 0 24 0 0 0 24 0 0 0 LRU
Un petit coup de pouce serait vraiment le bien venu: je suis perdu... :calim2: