~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to docs/index.rst

  • Committer: Toshio Kuratomi
  • Date: 2010-04-18 17:55:33 UTC
  • mto: (464.1.1 mod-wsgi)
  • mto: This revision was merged to the branch mainline in revision 465.
  • Revision ID: toshio@fedoraproject.org-20100418175533-bmrymlv9ir7v7jwg
Merge README.mod_wsgi into the installation instructions in docs/index.rst and add mod_wsgi note to NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
some path into the site, you'll need to specify it using
150
150
``--prefix=/some_path``.
151
151
 
 
152
Serving Loggerhead with mod_wsgi
 
153
--------------------------------
 
154
 
 
155
A second method for using loggehead with apache is to have apache itself
 
156
execute loggerhead via mod_wsgi.  You need to add configuration for apache and
 
157
for bazaar to make this work.  Example config files are in the loggerhead doc
 
158
directory as apache-loggerhead.conf and bazaar.conf.  You can copy them into
 
159
place and use them as a starting point following these directions:
 
160
 
 
161
1) Install mod_wsgi.  On Ubuntu and other Debian derived distros::
 
162
 
 
163
    sudo apt-get install libapache2-mod-wsgi
 
164
 
 
165
   On Fedora-derived distros::
 
166
 
 
167
    su -c yum install mod_wsgi
 
168
 
 
169
2) Copy the bazaar conf file where apache will find it (May be done for you if
 
170
   you installed loggerhead from a distribution package)::
 
171
 
 
172
    # install -d -o apache -g apache -m 0755 /etc/loggerhead
 
173
    # cp -p /usr/share/doc/loggerhead*/bazaar.conf /etc/loggerhead/
 
174
    # ln -s /etc/loggerhead /var/www/.bazaar
 
175
 
 
176
3) Create the cache directory (May be done for you if you installed loggerhead
 
177
   from a distribution package)::
 
178
 
 
179
    # install -d -o apache -g apache -m 0700 /var/cache/loggerhead/
 
180
 
 
181
4) Edit /etc/loggerhead/bazaar.conf.  You need to set http_root_dir to the filesystem
 
182
   path that you will find your bzr branches under.  Note that normal
 
183
   directories under that path will also be visible in loggerhead.
 
184
 
 
185
5) Install the apache conf file::
 
186
 
 
187
     # cp -p /usr/share/doc/loggerhead*/apache-loggerhead.conf /etc/httpd/conf.d/loggerhead.conf
 
188
 
 
189
6) Edit /etc/httpd/conf.d/loggerhead.conf to point to the url you desire to
 
190
   serve loggerhead on.  This should match with the setting for
 
191
   http_user_prefix in bazaar.conf
 
192
 
 
193
7) Restart apache and you should be able to start browsing
 
194
 
 
195
.. note:: If you have SELinux enabled on your system you may need to allow
 
196
   apache to execute files in temporary directories.  You will get a
 
197
   MemoryError traceback from python if this is the case.  This is because of
 
198
   the way that python ctypes interacts with libffi.  To rectify this, you may
 
199
   have to do several things, such as mounting tmpdirs so programs can be
 
200
   executed on them and setting this SELinux boolean::
 
201
 
 
202
       setsebool httpd_tmp_exec on
 
203
 
 
204
   This bug has information about how python and/or Linux distros might solve
 
205
   this issue permanently and links to bugs which diagnose the root cause.
 
206
   https://bugzilla.redhat.com/show_bug.cgi?id=582009
152
207
 
153
208
Search
154
209
------