Commits

Anonymous committed b4437c3

More docs for Webfaction

  • Participants
  • Parent commits e3158bb

Comments (0)

Files changed (1)

File docs/webfaction.txt

     $ chmod 0711 .
 
 
-Create configuration for site root
-----------------------------------
+Create configuration files
+--------------------------
 
 Let's say you want to host this repository at the root of
 ``http://mysite.com/``:
 * You have a `hgweb` or `hgwebdir` presenting the repository at
   ``http://mysite.com/hg/myapp-dev/``.
 
-Create a configuration file, such as ``myapp.slipper``, and make it
-look like this::
+Create a configuration file, such as ``slipper.cgi``, and place it in the
+directory of the web app you created, such as
+``/home2/myusername/webapps/my_slipper``. Make it look like this, except
+make the first two lines below all one line::
     
-    #!/home2/myusername/slipper.env/bin/slipper_cgi
-    [root]
+    #!/home2/myusername/slipper.env/bin/python2.5
+      /home2/myusername/slipper.env/bin/slipper_cgi
+
+    [dev]
     hg_repos = /home2/myusername/hg/myapp-dev
     hgweb_url = http://mysite.com/hg/myapp-dev
-    root = /docs
-    revision = tip
+    cache = /home2/myusername/slipper.env/cache
 
-Make the file executable::
+Make the file executable and create the cache::
     
-    $ chmod +x myapp.slipper
+    $ chmod 711 slipper.cgi
+    $ mkdir ~/slipper.env/cache
 
+Create an ``.htaccess`` file in the same directory, with these contents::
+    
+    Options +ExecCGI
 
+Verify that it worked by visiting
+``http://mysite.com/myapp.cgi?dev/tip/index.html``. You should see the index
+page of your site.
+
+Now make that available as ``http://mysite.com/`` and make other resources
+available as well by adding to ``.htaccess``::
+    
+    RewriteEngine On
+    RewriteBase /
+    RewriteRule ^$ slipper.cgi?dev/tip/docs/index.html [L]
+    RewriteRule (.*)/$ slipper.cgi?dev/tip/docs/$1/index.html [L]
+    RewriteRule (.*).txt slipper.cgi?dev/tip/docs/$1.txt [L]
+
+