-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.html
139 lines (127 loc) · 4.24 KB
/
install.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>ModPorter - Painless file uploads</title>
<link rel="shortcut icon" href="_ui/images/ico/favicon.ico" type="image/x-icon" />
<style type="text/css" media="screen,projection">
@import "stylesheets/application.css";
</style>
<!--[if IE]><style type="text/css" media="screen,projection">@import "stylesheets/main_ie.css";</style><![endif]-->
<!--[if lt IE 7]><style type="text/css" media="screen,projection">@import "stylesheets/main_ie6.css";</style><![endif]-->
</head>
<body>
<div class="head-wrapper">
<div id="menu">
<ul id="top-nav">
<li><a href="home.html">Home</a></li>
<li> | </li>
<li><a href="install.html">Install</a></li>
<li> | </li>
<li><a href="configure.html">Configure</a></li>
</ul>
</div>
<div class="clear"></div>
</div>
<div class="wrapper">
<div id="header">
<br />
<h1>ModPorter</h1>
<h2>Painless file uploads</h2>
</div>
<div id="content">
<h4>1. Install libapreq</h4>
ModPorter uses <a href="http://httpd.apache.org/apreq">libapreq</a> for parsing the multipart request.
<ul>
<li><a href="http://httpd.apache.org/apreq/download.cgi">Download</a> libapreq2 2.12 from <a href="http://mirrors.enquira.co.uk/apache/httpd/libapreq/libapreq2-2.12.tar.gz">here</a>.</li>
<li>Install the C API :<br /><br />
If you're on <b>OS X</b>, you may need to run the following first :
<pre>
<code>
% export CFLAGS="-arch x86_64"
% export ARCHFLAGS="-arch x86_64"
</code>
</pre>
Now :
<pre>
<code>
% ./configure --with-apache2-apxs=/path/to/apache2/bin/apxs
% make
% sudo make install
</code>
</pre>
</li>
<li>Load the mod_apreq2 module from your Apache's configuration file :
<pre>
<code>
LoadModule apreq_module modules/mod_apreq2.so
# mac users may need this instead:
# LoadModule apreq_module libexec/apache2/mod_apreq2.so
</code>
</pre>
</li>
</ul>
<h4>2. Install ModPorter</h4>
<ul>
<li>Get the latest version of ModPorter from <a href="http://github.com/actionrails/modporter/tree/master">GitHub</a>.</li>
<li>Install using the rake command :
<pre>
<code>
% rake
</code>
</pre>
If the above fails on OS X :
<pre>
<code>
% sudo rake build_mac
</code>
</pre>
</li>
<li>Load the porter_module module from your Apache's configure file :
<pre>
<code>
LoadModule porter_module modules/mod_porter.so
# mac users may need this instead:
# LoadModule porter_module libexec/apache2/mod_porter.so
</code>
</pre>
</li>
<li><a href="configure.html">Configure</a> ModPorter to your needs. ModPorter enabled VirtualHost should look something like :
<pre>
<code>
<VirtualHost *:8080>
ServerName actionrails.com
DocumentRoot /Users/actionrails/application/current/public
Porter On
PorterSharedSecret secret
</VirtualHost>
</code>
</pre>
</li>
</ul>
<h4>3. Install the Rails Plugin - modporter-plugin ( optional )</h4>
This step applies only if you wish to use ModPorter with a Rails application.
<ul>
<li>Install using the ModPorter Rails plugin :
<pre>
<code>
% script/plugin install git://github.com/actionrails/modporter-plugin.git
</code>
</pre>
</li>
<li>Configure the plugin by providing the shared secret in application.rb :
<pre>
<code>
class ApplicationController < ActionController::Base
self.mod_porter_secret = "secret"
end
</code>
</pre>
</ul>
</div>
</div>
<div id="footer">
A product of <a href="http://www.actionrails.com">ActionRails</a>
</div>
</body>
</html>