mirror of
https://github.com/gophernicus/gophernicus.git
synced 2025-02-02 15:08:00 -05:00
update documentation about vhosts
This commit is contained in:
parent
c290cdd192
commit
aae181adc9
33
README.md
33
README.md
@ -72,7 +72,6 @@ on the root menu don't work make sure you are using the `-h HOSTNAME`
|
|||||||
parameter in your configuration (with a valid resolveable hostname
|
parameter in your configuration (with a valid resolveable hostname
|
||||||
instead of `HOSTNAME` - see INSTALL).
|
instead of `HOSTNAME` - see INSTALL).
|
||||||
|
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
Gophernicus has been written with high security in mind. There should
|
Gophernicus has been written with high security in mind. There should
|
||||||
@ -89,7 +88,6 @@ The `-nx` option prevents execution of any script or external file,
|
|||||||
and the `-nu` option suppresses scanning for and serving of `~user`
|
and the `-nu` option suppresses scanning for and serving of `~user`
|
||||||
directories (which are normally at `~/public_html/` for each user).
|
directories (which are normally at `~/public_html/` for each user).
|
||||||
|
|
||||||
|
|
||||||
## Gophermaps
|
## Gophermaps
|
||||||
|
|
||||||
By default all gopher menus are automatically generated from the
|
By default all gopher menus are automatically generated from the
|
||||||
@ -98,7 +96,6 @@ informational text along with the files, or if you want to completely
|
|||||||
replace the generated menu with your own you need to take a look at
|
replace the generated menu with your own you need to take a look at
|
||||||
gophermaps. See the [README.gophermap](./README.gophermap) for more information.
|
gophermaps. See the [README.gophermap](./README.gophermap) for more information.
|
||||||
|
|
||||||
|
|
||||||
## Gophertags
|
## Gophertags
|
||||||
|
|
||||||
A gophertag file can be used to virtually rename a directory. Let's
|
A gophertag file can be used to virtually rename a directory. Let's
|
||||||
@ -109,7 +106,6 @@ will show "bar" but the links will still point to "foo". This is
|
|||||||
useful for creating descriptive names for directories without
|
useful for creating descriptive names for directories without
|
||||||
littering the file system with spaces and weird characters.
|
littering the file system with spaces and weird characters.
|
||||||
|
|
||||||
|
|
||||||
## Personal gopherspaces
|
## Personal gopherspaces
|
||||||
|
|
||||||
Gophernicus supports users personal gopherspaces. If a user has
|
Gophernicus supports users personal gopherspaces. If a user has
|
||||||
@ -121,30 +117,31 @@ This is suppressed if the `-nu` option is given.
|
|||||||
In this case, any `~` entry which otherwise initiates listing
|
In this case, any `~` entry which otherwise initiates listing
|
||||||
of user directories will be displayed literally.
|
of user directories will be displayed literally.
|
||||||
|
|
||||||
|
|
||||||
## Virtual hosting
|
## Virtual hosting
|
||||||
|
|
||||||
Gophernicus supports virtual hosting, or serving more than one logical
|
Gophernicus supports virtual hosting, or serving more than one logical
|
||||||
domain using the same IP address. Since gopher (RFC1436) doesn't
|
domain using the same IP address. Since gopher (RFC1436) doesn't
|
||||||
support virtual hosting this requires some clever (but mostly invisble)
|
support virtual hosting this requires some hacks.
|
||||||
hacks.
|
|
||||||
|
|
||||||
To enable virtual hosting create one or more directories under your
|
To enable virtual hosting create one or more directories under your
|
||||||
gopher root which are named after your domain names. The primary vhost
|
gopher root which are named after your domain names. The primary vhost
|
||||||
directory (set with the `-h HOSTNAME` option) must exist or virtual
|
directory (set with the `-h HOSTNAME` option) must exist or virtual
|
||||||
hosting will be disabled. Then simply add content to the hostname
|
hosting will be disabled. Then simply add content to the hostname
|
||||||
directories and you're up and running.
|
directories and you're (kind of) up and running.
|
||||||
|
|
||||||
Almost.
|
There is a serious issue with virtual hosting.
|
||||||
|
|
||||||
To make gopher clients work properly with virtual hosting, create a
|
As stated previously, RFC1436 dosen't support virtual hosting. Clients won't
|
||||||
root gophermap for each of your domains and include the "%" type
|
like it.
|
||||||
character to create a list of all available virtual hosts (see
|
|
||||||
README.gophermap). The generated virtual host links will be created so
|
|
||||||
that standard gopher clients will find the correct domain even when
|
|
||||||
they don't specifically tell the server which host they're trying to
|
|
||||||
reach.
|
|
||||||
|
|
||||||
|
How the virtual hosting works, is that it loops through the vhosts looking for
|
||||||
|
the selector. As you might think, the root gophermap exists on all of the
|
||||||
|
vhosts, meaning it might not use the correct vhost. There is currently no easy
|
||||||
|
way to fix this.
|
||||||
|
|
||||||
|
It is recommended to add '%' on a line by itself to the bottom of your root
|
||||||
|
gophermaps. This will add "special" links of the format example.com/;example.com
|
||||||
|
which forces the correct vhost.
|
||||||
|
|
||||||
## CGI support
|
## CGI support
|
||||||
|
|
||||||
@ -189,7 +186,6 @@ the PHP command line interpreter. In other words, PHP starts working.
|
|||||||
And don't use the CGI version of PHP as it outputs HTTP headers the
|
And don't use the CGI version of PHP as it outputs HTTP headers the
|
||||||
gopher protocol doesn't have.
|
gopher protocol doesn't have.
|
||||||
|
|
||||||
|
|
||||||
## Charset support and conversions
|
## Charset support and conversions
|
||||||
|
|
||||||
Gophernicus supports three charsets: US-ASCII, ISO-8859-1 and UTF-8.
|
Gophernicus supports three charsets: US-ASCII, ISO-8859-1 and UTF-8.
|
||||||
@ -208,7 +204,6 @@ than pure US-ASCII. If you want to disable the conversion use the
|
|||||||
something else than US-ASCII just use for example the `-o ISO-8859-1`
|
something else than US-ASCII just use for example the `-o ISO-8859-1`
|
||||||
option.
|
option.
|
||||||
|
|
||||||
|
|
||||||
## Selector rewriting
|
## Selector rewriting
|
||||||
|
|
||||||
Selector rewriting lets you rewrite parts of the selector on the fly.
|
Selector rewriting lets you rewrite parts of the selector on the fly.
|
||||||
@ -243,7 +238,6 @@ monitoring systems. To ease up such integrations, Gophernicus
|
|||||||
supports HTTP requests of the server-status page using an URL like
|
supports HTTP requests of the server-status page using an URL like
|
||||||
`http://HOSTNAME:70/server-status?auto` .
|
`http://HOSTNAME:70/server-status?auto` .
|
||||||
|
|
||||||
|
|
||||||
## TLS/SSL and proxy support
|
## TLS/SSL and proxy support
|
||||||
|
|
||||||
As of version 2.3 Gophernicus supports the HAproxy proxy protocol
|
As of version 2.3 Gophernicus supports the HAproxy proxy protocol
|
||||||
@ -292,4 +286,3 @@ Example:
|
|||||||
accept = :::7070
|
accept = :::7070
|
||||||
connect = 127.0.0.1:70
|
connect = 127.0.0.1:70
|
||||||
protocol = proxy
|
protocol = proxy
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user