The hunchentoot-multi-acceptor Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The hunchentoot-multi-acceptor Reference Manual

This is the hunchentoot-multi-acceptor Reference Manual, version 0.0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Dec 02 10:31:05 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

hunchentoot-multi-acceptor

Arnold Noronha arnold@jipr.io

Typically each hunchentoot acceptor listens on a single port, and typically serves a single domain. A typical configuration is to have a frontend webserver like Nginx to route requests to the appropriate port.

This is hard to manage when the number of domains keep increasing (which is typical for small companies trying to iterate on different products). hunchentoot-multi-acceptor simplifies the configurations of such systems.

Installation

As an example, I personally run tdrhq.com (my personal website) and jipr.io (a project I'm working on.) These have two different hunchentoot acceptors:

(defvar *tdrhq-acceptor* (make-instance 'hunchentoot:easy-acceptor
                                         :port nil
                                         :name 'tdrhq))

(defvar *jipr-acceptor*
  (make-instance 'hunchentoot:easy-acceptor
                 :port nil
                 :name 'jipr))

These definitions could be in different packages and systems, it doesn't matter. Also the :port argument is useful when developing locally and want to test only one of the websites, but it won't be used by multi-acceptor.

Now, we have a multi-acceptor setup as follows:

(defparameter *multi-acceptor* (make-instance 'hunchentoot-multi-acceptor:multi-acceptor :port 4001 :name 'multi-acceptor))
(hunchentoot-multi-acceptor:add-acceptor *multi-acceptor* "tdrhq.com" *tdrhq-acceptor*)
(hunchentoot-multi-acceptor:add-acceptor *multi-acceptor* "www.jipr.io" *jipr-acceptor*)

(hunchentoot:start *multi-acceptor*)

At this point, you can configure your Nginx frontend for both websites to point to localhost:4001. Make sure the "Host" header is appropriately set. (proxy_set_header Host $host:$server_port). After that hunchentoot-multi-acceptor will take care of routing to the appropriate acceptor. Only one port will be opened.

License

Apache License, Version 2.0


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 hunchentoot-multi-acceptor

Author

Arnold Noronha <arnold@jipr.io>

License

Apache License, Version 2.0

Description

Multiple domain support under single hunchentoot acceptor

Version

0.0.1

Dependencies
Source

hunchentoot-multi-acceptor.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 hunchentoot-multi-acceptor.asd

Location

hunchentoot-multi-acceptor.asd

Systems

hunchentoot-multi-acceptor (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 hunchentoot-multi-acceptor/package.lisp

Parent

hunchentoot-multi-acceptor (system)

Location

package.lisp

Packages

hunchentoot-multi-acceptor


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 hunchentoot-multi-acceptor/hunchentoot-multi-acceptor.lisp

Dependency

package.lisp (file)

Parent

hunchentoot-multi-acceptor (system)

Location

hunchentoot-multi-acceptor.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 hunchentoot-multi-acceptor

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *default-acceptor*
Package

hunchentoot-multi-acceptor

Source

hunchentoot-multi-acceptor.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: add-acceptor MULTI-ACCEPTOR HOST ACCEPTOR
Package

hunchentoot-multi-acceptor

Source

hunchentoot-multi-acceptor.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: listen-fd OBJECT
Generic Function: (setf listen-fd) NEW-VALUE OBJECT
Package

hunchentoot-multi-acceptor

Methods
Method: listen-fd (MULTI-ACCEPTOR multi-acceptor)

automatically generated reader method

Source

hunchentoot-multi-acceptor.lisp (file)

Method: (setf listen-fd) NEW-VALUE (MULTI-ACCEPTOR multi-acceptor)

automatically generated writer method

Source

hunchentoot-multi-acceptor.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Classes

Class: multi-acceptor ()
Package

hunchentoot-multi-acceptor

Source

hunchentoot-multi-acceptor.lisp (file)

Direct superclasses

acceptor (class)

Direct methods
  • start-listening (method)
  • listen-fd (method)
  • listen-fd (method)
  • sub-acceptors (method)
  • sub-acceptors (method)
Direct slots
Slot: sub-acceptors
Readers

sub-acceptors (generic function)

Writers

(setf sub-acceptors) (generic function)

Slot: listen-fd
Initargs

:listen-fd

Readers

listen-fd (generic function)

Writers

(setf listen-fd) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: copy-request REQUEST ACCEPTOR
Package

hunchentoot-multi-acceptor

Source

hunchentoot-multi-acceptor.lisp (file)

Function: listen-on-fd FD &key ELEMENT-TYPE
Package

hunchentoot-multi-acceptor

Source

hunchentoot-multi-acceptor.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Generic functions

Generic Function: sub-acceptors OBJECT
Generic Function: (setf sub-acceptors) NEW-VALUE OBJECT
Package

hunchentoot-multi-acceptor

Methods
Method: sub-acceptors (MULTI-ACCEPTOR multi-acceptor)

automatically generated reader method

Source

hunchentoot-multi-acceptor.lisp (file)

Method: (setf sub-acceptors) NEW-VALUE (MULTI-ACCEPTOR multi-acceptor)

automatically generated writer method

Source

hunchentoot-multi-acceptor.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Classes

Class: multi-request ()
Package

hunchentoot-multi-acceptor

Source

hunchentoot-multi-acceptor.lisp (file)

Direct superclasses

request (class)

Direct methods

process-request (method)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   H   L  
Index Entry  Section

F
File, Lisp, hunchentoot-multi-acceptor.asd: The hunchentoot-multi-acceptor․asd file
File, Lisp, hunchentoot-multi-acceptor/hunchentoot-multi-acceptor.lisp: The hunchentoot-multi-acceptor/hunchentoot-multi-acceptor․lisp file
File, Lisp, hunchentoot-multi-acceptor/package.lisp: The hunchentoot-multi-acceptor/package․lisp file

H
hunchentoot-multi-acceptor.asd: The hunchentoot-multi-acceptor․asd file
hunchentoot-multi-acceptor/hunchentoot-multi-acceptor.lisp: The hunchentoot-multi-acceptor/hunchentoot-multi-acceptor․lisp file
hunchentoot-multi-acceptor/package.lisp: The hunchentoot-multi-acceptor/package․lisp file

L
Lisp File, hunchentoot-multi-acceptor.asd: The hunchentoot-multi-acceptor․asd file
Lisp File, hunchentoot-multi-acceptor/hunchentoot-multi-acceptor.lisp: The hunchentoot-multi-acceptor/hunchentoot-multi-acceptor․lisp file
Lisp File, hunchentoot-multi-acceptor/package.lisp: The hunchentoot-multi-acceptor/package․lisp file

Jump to:   F   H   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   F   G   L   M   S  
Index Entry  Section

(
(setf listen-fd): Exported generic functions
(setf listen-fd): Exported generic functions
(setf sub-acceptors): Internal generic functions
(setf sub-acceptors): Internal generic functions

A
add-acceptor: Exported functions

C
copy-request: Internal functions

F
Function, add-acceptor: Exported functions
Function, copy-request: Internal functions
Function, listen-on-fd: Internal functions

G
Generic Function, (setf listen-fd): Exported generic functions
Generic Function, (setf sub-acceptors): Internal generic functions
Generic Function, listen-fd: Exported generic functions
Generic Function, sub-acceptors: Internal generic functions

L
listen-fd: Exported generic functions
listen-fd: Exported generic functions
listen-on-fd: Internal functions

M
Method, (setf listen-fd): Exported generic functions
Method, (setf sub-acceptors): Internal generic functions
Method, listen-fd: Exported generic functions
Method, sub-acceptors: Internal generic functions

S
sub-acceptors: Internal generic functions
sub-acceptors: Internal generic functions

Jump to:   (  
A   C   F   G   L   M   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
L   S  
Index Entry  Section

*
*default-acceptor*: Exported special variables

L
listen-fd: Exported classes

S
Slot, listen-fd: Exported classes
Slot, sub-acceptors: Exported classes
Special Variable, *default-acceptor*: Exported special variables
sub-acceptors: Exported classes

Jump to:   *  
L   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   H   M   P   S  
Index Entry  Section

C
Class, multi-acceptor: Exported classes
Class, multi-request: Internal classes

H
hunchentoot-multi-acceptor: The hunchentoot-multi-acceptor system
hunchentoot-multi-acceptor: The hunchentoot-multi-acceptor package

M
multi-acceptor: Exported classes
multi-request: Internal classes

P
Package, hunchentoot-multi-acceptor: The hunchentoot-multi-acceptor package

S
System, hunchentoot-multi-acceptor: The hunchentoot-multi-acceptor system

Jump to:   C   H   M   P   S