Configuration of mod_passenger with apache
- Config apache
Configure apache to enable the module and the application
vim /etc/httpd/conf.d/mod_passenger.conf
LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-2.2.5
PassengerRuby /usr/bin/ruby
vim /etc/httpd/conf.d/vhost.conf
NameVirtualHost *:80
#Section to define the rails application on apache
<VirtualHost *:80>
ServerName apphostname
DocumentRoot /var/www/appfolder/current/public
ErrorLog /var/log/httpd/app-error.log
RailsEnv development
<Directory /var/www/appfolder/>
Options Indexes +FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
</VirtualHost>
#Section to imit the access on server-status and server-info
<VirtualHost *:80>
ServerName hostnameofthe server
<Location /server-info>
SetHandler server-status
Order deny,allow
Deny from all
allow from youripsite
</Location>
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
allow from youripsite
</Location>
</VirtualHost>
- Mod_passenger parametters :
- Module Name: mod_passenger.c
- Content handlers: yes
- Configuration Phase Participation: Create Directory Config, Merge Directory Configs, Create Server Config, Merge Server Configs
- Request Phase Participation: Map to Storage, Fixups, Content Handlers
- Module Directives:
- PassengerRoot - The Passenger root folder.
- PassengerLogLevel - Passenger log verbosity.
- PassengerRuby - The Ruby interpreter to use.
- PassengerMaxPoolSize - The maximum number of simultaneously alive application instances.
- PassengerMaxInstancesPerApp - The maximum number of simultaneously alive application instances a single application may occupy.
- PassengerPoolIdleTime - The maximum number of seconds that an application may be idle before it gets terminated.
- PassengerUseGlobalQueue - Enable or disable Passenger's global queuing mode mode.
- PassengerUserSwitching - Whether to enable user switching support.
- PassengerDefaultUser - The user that Rails/Rack applications must run as when user switching fails or is disabled.
- PassengerTempDir - The temp directory that Passenger should use.
- PassengerMaxRequests - The maximum number of requests that an application instance may process.
- PassengerHighPerformance - Enable or disable Passenger's high performance mode.
- PassengerEnabled - Enable or disable Phusion Passenger.
- PassengerStatThrottleRate - Limit the number of stat calls to once per given seconds.
- PassengerRestartDir - The directory in which Passenger should look for restart.txt.
- PassengerAppRoot - The application's root directory.
- PassengerUploadBufferDir - The directory in which upload buffer files should be placed.
- PassengerResolveSymlinksInDocumentRoot - Whether to resolve symlinks in the DocumentRoot path
- PassengerAllowEncodedSlashes - Whether to support encoded slashes in the URL
- RailsBaseURI - Reserve the given URI to a Rails application.
- RailsAutoDetect - Whether auto-detection of Ruby on Rails applications should be enabled.
- RailsAllowModRewrite - Whether custom mod_rewrite rules should be allowed.
- RailsEnv - The environment under which a Rails app must run.
- RailsSpawnMethod - The spawn method to use.
- RailsFrameworkSpawnerIdleTime - The maximum number of seconds that a framework spawner may be idle before it is shutdown.
- RailsAppSpawnerIdleTime - The maximum number of seconds that an application spawner may be idle before it is shutdown.
- RackBaseURI - Reserve the given URI to a Rack application.
- RackAutoDetect - Whether auto-detection of Rack applications should be enabled.
- RackEnv - The environment under which a Rack app must run.
- PassengerWSGIAutoDetect - Whether auto-detection of WSGI applications should be enabled.
- RailsRuby - Deprecated option.
- RailsMaxPoolSize - Deprecated option.
- RailsMaxInstancesPerApp - Deprecated option
- RailsPoolIdleTime - Deprecated option.
- RailsUserSwitching - Deprecated option.
- RailsDefaultUser - Deprecated option.
- RailsSpawnServer - Obsolete option.
-
















































