1. Install libapreq
ModPorter uses
libapreq for parsing the multipart request.
- Download libapreq2 2.12 from here.
- Install the C API :
If you're on OS X, you may need to run the following first :
% export CFLAGS="-arch x86_64"
% export ARCHFLAGS="-arch x86_64"
Now :
% ./configure --with-apache2-apxs=/path/to/apache2/bin/apxs
% make
% sudo make install
- Load the mod_apreq2 module from your Apache's configuration file :
LoadModule apreq_module modules/mod_apreq2.so
# mac users may need this instead:
# LoadModule apreq_module libexec/apache2/mod_apreq2.so
2. Install ModPorter
- Get the latest version of ModPorter from GitHub.
- Install using the rake command :
% rake
If the above fails on OS X :
% sudo rake build_mac
- Load the porter_module module from your Apache's configure file :
LoadModule porter_module modules/mod_porter.so
# mac users may need this instead:
# LoadModule porter_module libexec/apache2/mod_porter.so
- Configure ModPorter to your needs. ModPorter enabled VirtualHost should look something like :
<VirtualHost *:8080>
ServerName actionrails.com
DocumentRoot /Users/actionrails/application/current/public
Porter On
PorterSharedSecret secret
</VirtualHost>
3. Install the Rails Plugin - modporter-plugin ( optional )
This step applies only if you wish to use ModPorter with a Rails application.