Use Twisted Web as it's a bit simpler to configure and is Python

This commit is contained in:
Donald Stufft 2014-05-14 10:37:40 -04:00
parent 08ad02e889
commit 6926ff3f5b
1 changed files with 7 additions and 19 deletions

View File

@ -60,12 +60,12 @@ do not have their access restricted.
Compared to the complex rules which a project must be aware of to prevent
themselves from being considered unsafely hosted setting up an index is fairly
trivial and in the simplest case does not require anything more than a
filesystem and a standard web server such as Nginx. Even if using simple
static hosting without autoindexing support, it is still straightforward
to generate appropriate index pages as static HTML.
filesystem and a standard web server such as Nginx or Twisted Web. Even if
using simple static hosting without autoindexing support, it is still
straightforward to generate appropriate index pages as static HTML.
Example Index with Nginx
~~~~~~~~~~~~~~~~~~~~~~~~
Example Index with Twisted Web
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Create a root directory for your index, for the purposes of the example
I'll assume you've chosen ``/var/www/index.example.com/``.
@ -73,22 +73,10 @@ Example Index with Nginx
as ``mkdir -p /var/www/index.example.com/{foo,bar,other}/``.
3. Place the package files for each project in their respective folder,
creating paths like ``/var/www/index.example.com/foo/foo-1.0.tar.gz``.
4. Configure nginx to serve the root directory, ideally with TLS, with the
autoindex directive enable (see below for example configuration).
4. Configure Twisted Web to serve the root directory, ideally with TLS.
::
server {
listen 443 ssl;
server_name index.example.com;
ssl_certificate /etc/pki/tls/certs/index.example.com.crt;
ssl_certificate_key /etc/pki/tls/certs/index.example.com.key;
root /var/www/index.example.com;
autoindex on;
}
$ twistd -n web --path /var/www/index.example.com/
Examples of Additional indexes with pip