Ruby On Rails 3 アプリケーションといくつかの PHP Web サイトを実行する必要があるサーバーを設定しています。サーバーは、Apache 2.4.3 を実行する CentOS 5.8 マシンです。サーバーはテスト用および PRE-production 用であるため、パフォーマンスは問題になりません。
私は Rails アプリに Phusion Passenger を使用しており、(関連付けられたフォルダーと DB アカウントを使用して) 多数の仮想ホストを作成しました。次に、PHP 用に他の v-hosts を使用する予定です。
出来ますか?どのように進めればよいですか?
どうもありがとうございました
詳細:
httpd.conf:
LoadModule passenger_module /app/auser/.rvm/gems/ruby-1.9.3-p286/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /app/auser/.rvm/gems/ruby-1.9.3-p286/gems/passenger-3.0.17
PassengerRuby /app/auser/.rvm/wrappers/ruby-1.9.3-p286/ruby
(...)
##
## Virtual hosts
Include conf/extra/httpd-vhosts-phpmyadmin.conf
Include conf/extra/httpd-vhosts-rails01.conf
Include conf/extra/httpd-vhosts-rails02.conf
Include conf/extra/httpd-vhosts-php01.conf
Include conf/extra/httpd-vhosts-php02.conf
....
Passenger が管理する v-host は次のようになります:
conf/extra/httpd-vhosts-rails01.conf を含めます
<VirtualHost *:80>
ServerName rails01.lcl
DocumentRoot "/app/auser/apps/rails01/public"
<Directory "/app/auser/apps/rails01/public">
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
PHP ベースの v-hosts は次のようになります: conf/extra/httpd-vhosts-php01.conf を含めます
<VirtualHost *:80>
ServerName php01.lcl
DocumentRoot "/app/auser/apps/php01/public"
<Directory "/app/auser/apps/php01/public">
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>