# $Id$ # Copyright (C) 2007--2008 American Registry for Internet Numbers ("ARIN") # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ARIN DISCLAIMS ALL WARRANTIES WITH # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS. IN NO EVENT SHALL ARIN BE LIABLE FOR ANY SPECIAL, DIRECT, # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. """ Usage: python http-client [ { -c | --config } configfile ] [ { -h | --help } ] [ { -m | --msg } message ] Default configuration file is http-demo.conf, override with --config option. """ import rpki.config, rpki.https, getopt, sys msg = "This is a test. This is only a test. Had this been real you would now be really confused.\n" cfg_file = "http-demo.conf" opts,argv = getopt.getopt(sys.argv[1:], "c:hm:?", ["config=", "help", "msg="]) for o,a in opts: if o in ("-h", "--help", "-?"): print __doc__ sys.exit(0) elif o in ("-m", "--msg"): msg = a elif o in ("-c", "--config"): cfg_file = a if argv: print __doc__ raise RuntimeError, "Unexpected arguments %s" % argv cfg = rpki.config.parser(cfg_file, "client") print rpki.https.client(privateKey = rpki.x509.RSA(Auto_file = cfg.get("https-key")), certChain = rpki.x509.X509_chain(Auto_files = cfg.multiget("https-cert")), x509TrustList = rpki.x509.X509_chain(Auto_files = cfg.multiget("https-ta")), url = cfg.get("https-url"), msg = msg) n>
path: root/rpkid/portal-gui/README.apache
blob: 2955061a3f398d56c334506519bc56a8ad4bd626 (plain) (tree)
1
2
3
4
5
6
7
8

    

                                                               
 


                                                                      




                                                                                       


                                                                     

                                                                     


                                                                     
 







                                                                     

         

                                                                        
$Id$

This file details how to configure apache+mod_wsgi to serve the
portal-gui.

The web interface must be deployed to work with an existing web
server.  Instructions for using Django with Apache and mod_wsgi can be
found at
http://docs.djangoproject.com/en/1.2/howto/deployment/modwsgi/#howto-deployment-modwsgi

Setup
=====

- Follow the steps in detailed in the $top/portal-gui/README file to
  set up the portal-gui for the self-hosted resource handle that runs
  rpkid.

- After running "make" in $top/portal-gui, there will be a file named
  $top/portal-gui/apache/rpki.conf.  This is a configuration file for
  Apache which does most of the work configuring the portal-gui to
  run under mod_wsgi.

You may need to edit the paths for Django if they are installed in a
different location on your host.  Note that this is only necessary if
you wish to use the Django admin web console.  The portal-gui itself
will operate correctly even if this path is wrong.

NOTE: Apache loads the configuration files sorted alphabetically.
Thus, you need to ensure that your file is renamed as appropriate for
your environment.

  Fedora:
  $ cp $top/portal-gui/apache/rpki.conf /etc/httpd/conf.d/wsgi-rpki.conf
  $ service httpd restart