Bonjour à tous,
J'ai un problème de configuration de mom VirtualHost pour une appli ruby on rails.
Voici le VirtualHost par defaut qui était deja present :
Ceci fait tomber sur une page d'accueil lorsque l'on accede à l'adresse http://herd.ida.liu.se
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 NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place #LD removed default #RedirectMatch ^/$ /apache2-default/ </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 ServerSignature On 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> # Added by LD JkMount /nlpfarm/* ajp13 JkMount /accqua/* ajp13 JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 </VirtualHost>
J'aimerais pouvoir acceder à mon appli ruby on rails à l'adresse http://herd.ida.liu.se/CoreSong
Voici le VirtualHost que j'ai créé :
Avec ce fichier cela "ecrase" la page d'accueil car l'appli est dispo à http://herd.ida.liu.se
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 NameVirtualHost *:80 <VirtualHost *:80> ServerName herd.ida.liu.sese DocumentRoot /var/www/CoreSong/current/public <Directory "/var/www/CoreSong/current/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Proxy balancer://mongrel_cluster> BalancerMember http://127.0.0.1:8000 Allow from localhost </Proxy> RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -f RewriteRule (.*) $1 [L] ProxyPass / balancer://mongrel_cluster/ ProxyPassReverse / balancer://mongrel_cluster/ #Fix for Apache bug 39499 SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 # Ne pas rediriger les images, les CSS # et les Javascripts vers Mongrel ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! # Et précisons le path où se trouve # les images, les CSS et les javascripts Alias /images /var/www/CoreSong/current/public/images Alias /stylesheets /var/www/CoreSong/current/public/stylesheets Alias /javascripts /var/www/CoreSong/current/public/javascripts # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html ErrorLog /var/log/apache2/error.coresong.log CustomLog /var/log/apache2/access.coresong.log combined </VirtualHost>
J'ai tenté d'utiliser ServerAlias notamment pour regler le problème en vain.
Si vous avez une idée ou la solution je suis preneur. Merci en avance !
Nicolas
Partager