Rails and Php on Apache without virtualhost
Inserito da assente il 6 Gennaio, 2006 - 22:54 RubyThis is a simply hack to set up Apache with Ruby on Rails and PHP in the same tree.
I set up Apache+Rails following the wiki but then my php sites didn't work anymore, so I found this not for production way to have both together with a unique Apache installation and without virtual host(app1.host, app2.host).
So:
cd /var/www
rails railstest
cd railstest
script/generate controller prova
<VirtualHost *>
ServerName localhost
DocumentRoot /var/www/
ErrorLog /var/log/apache2/error.log
<Directory /var/www/railstest/public>
Options ExecCGI FollowSymLinks
AddHandler fcgi-script .fcgi
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Now restart apache and You will be able to access to your rails application with http://localhost/railstest/public/prova, if you don't want /public in the middle you can create symbolic links of public in /var/www (and call it railsapp)so You will be able to access to the controller with http://localhost/railsapp/prova and http://localhost/drupal-4.7-beta will work as usual 
I've been surprised that ror on Apache is slower than on Webrick(Ruby's webserver), I gonna try a real world solution.. probably this is a good point where to start.



Commenti recenti
2 ore 54 min fa
9 ore 38 min fa
9 ore 48 min fa
10 ore 3 min fa
1 giorno 6 ore fa
1 giorno 12 ore fa
1 giorno 18 ore fa
2 giorni 4 ore fa
2 giorni 12 ore fa
2 giorni 18 ore fa