-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathzomne.txt
38 lines (24 loc) · 1.54 KB
/
zomne.txt
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
= [wiki:DivmodNevow/Deployment Nevow Deployment] : Zomne =
{{{
#!rst
Pre-conditions
--------------
First, make sure `#529`:trac: is fixed (or apply the patch yourself).
Shared host with Apache
-----------------------
Then, if you are, like me, on a shared server with Apache, you've probably got Python, Twisted and Nevow installed locally. Therefore, zomne will fail to start twistd. Change the the line in zomne.c that says::
sprintf(scratch, 'twistd -oy %s &> %s/twistd.log', tacfile, basedir);
to::
sprintf(scratch, '/path/to/twistd -oy %s &> %s/twistd.log', tacfile, basedir);
Build zomne and place it somewhere::
gcc zomne.c -o /path/to/zomne
Furthermore, PYTHONPATH is probably not set either, so you'll have to make sure to set that manually. I do that in a shell script that wraps the zomne.cgi binary. You could also write a small C application for speed. Either way, place this shell script in your webroot's cgi-bin directory, as nevow.cgi::
#!/bin/sh
export PYTHONPATH=$PYTHONPATH:/home/myself/local/lib/python2.3/site-packages
exec /path/to/zomne
If you have access to mod_rewrite in your .htaccess, place the following lines in webroot/.htaccess::
RewriteEngine On
RewriteRule ^$ nevow.cgi [L]
Now you should be able to access your Nevow application as http://domain.tld
If using the included zomne.tac to test your installation, remember to add ``addSlash=True``, or Nevow will give you a 404. While that hows the install was successful, it's also nice to see that your HelloWorld outputs what's expected. :)
}}}