Uso apache con mongrel per servire una app rails con il seguente file
di configurazione.
Funziona bene. Vorrei servire un’altra applicazione e immagino di dover
aggiungere un’ altra sezione
<VirtualHost *:80>
ma non riesco a configurarla, continua a servirmi solo la prima
applicazione
potete aiutarmi?
grazie
<VirtualHost *:80>
ServerName 72.192.209.102
DocumentRoot d:/jpnprj/jpn/public
<Directory “d:/jpnprj/jpn/public”>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Configure mongrel instances
<Proxy balancer://mongrel_cluster>
BalancerMember http://72.192.209.102:4005
BalancerMember http://72.192.209.102:4006
RewriteEngine On
Uncomment for rewrite debugging
#RewriteLog logs/your_app_deflate_log deflate
#RewriteLogLevel 9
Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]
Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Uncomment for deflate debugging
#DeflateFilterNote Input input_info
#DeflateFilterNote Output output_info
#DeflateFilterNote Ratio ratio_info
#LogFormat ‘“%r” %{output_info}n/%{input_info}n (%{ratio_info}n%%)’
deflate
#CustomLog logs/your_app_deflate_log deflate
ErrorLog logs/your_app_error_log
CustomLog logs/your_access_log combined