Ciao a Tutti
oggi ho provato ad installare ruby on rails + mod_fcgid + apache2, sul
mio server casalingo.
ho configurato apache con virtualhost in questa maniera
<VirtualHost *:80>
ServerName www.rails.dex
DocumentRoot /home/rails/rails/public
ErrorLog logs/rails.dex-error_log
CustomLog logs/rails.dex-access_log common
<Directory /home/rails/rails/public>
Options Indexes FollowSymLinks ExecCGI
Allow from all
AllowOverride all
</Directory>
il file .htaccess della directory public di rails è il seguente:
Resources: My working .htaccess file:
AddHandler fastcgi-script .fcgi
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
ErrorDocument 500 /500.html
#ErrorDocument 500 "
Ma quando punto il browser a www.rails.dex, ottengo la pagina di
benvenuto…
se poi provo a clikkare su: About your application’s environment
si apre un riquadro giallo con scritto:
#!/usr/bin/ruby # # You may specify the path to the FastCGI crash log (a
log of unhandled # exceptions which forced the FastCGI instance to exit,
great for debugging) # and the number of requests to process before
running garbage collection. # # By default, the FastCGI crash log is
RAILS_ROOT/log/fastcgi.crash.log # and the GC period is nil (turned
off). A reasonable number of requests # could range from 10-100
depending on the memory footprint of your app. # # Example: # # Default
log path, normal GC behavior. # RailsFCGIHandler.process! # # # Default
log path, 50 requests between GC. # RailsFCGIHandler.process! nil, 50 #
# Custom log path, normal GC behavior. # RailsFCGIHandler.process!
‘/var/log/myapp_fcgi_crash.log’ # require File.dirname(FILE) +
“/…/config/environment” require ‘fcgi_handler’
RailsFCGIHandler.process!
Ma cosa vuol dire?
Per l’installazione ho seguito la guida http://wiki.rubyonrails.com
Gracias
andrea