How To Admin /
Configure a Domain
Nowadays domains are cheap (about $10 annually) so it is common that most wiki project use their own domain. This page describes what you have to do to put a wiki under a specific domain.
- Comment:
- The natural (simplest, cheapest) way to position a wiki is in a subdirectory of an existing domain. Even if you change that initial situation and add your unique domain to the wiki, usually the wiki stays accessible through this original URL. This has advantages when you manage multiple wikis.
Registration of the domain
To get a domain you have to
- buy the domain for an annual fee from directly from some registrar or indirectly from some provider. The cost for the domain depends on the top-level domain you want. .com, .org, .net are typically preferred because they are somehow universal and cheaper than national domains like .fr, .cc or .nu. The typical cost is 5-30$ per year (we currently pay 10 EUR for com/org), you shouldn't pay more.
- when ordering the domain, you specify the IP address (something like 216.239.39.104) of the physical computer where your webspace is located and in addition you specify the IP-addresses of two name-servers that will convert your domain name (e. g. mydomain.com) to your IP address every day. You will typically use the name-server-IPs given by your provider (if you run your own NameServers you probably don't need this how-to anyway).
After this primary registration the domain points to the main server directory and any Browser accessing the domain will show the index.html in the main web directory. There is no limit to the number of domains that can point to the same physical server or files.
To direct the incomming request to a special subdirectory, you need to configure the web-server-software (typically Apache) to know about the domain and direct the requests accordingly. This is typically done in /etc/httpd/httpd.conf or a similar file (depending on the Apache version) by an VirtualHost entry. A typical simple entry may look like this:
| <VirtualHost dorfwiki.org www.dorfwiki.org>
DocumentRoot "/usr/local/httpd/htdocs/dorfwiki"
ServerName www.dorfwiki.org
Redirect /index.html http://www.dorfwiki.org/wiki.cgi
</VirtualHost> |
|
|
It contains:
- the official server domain name (ServerName)
- the domains it answers to (in the VirtualHost line)
- the absolute web hosting directory path that shall be used for the domain (DocumentRoot)
- a handy (optional) Redirect that converts the naked domain request (that is interpretet as a rewuest to index.html) into a wiki call
[[Hint:]] Don't forget that you have to RestartApache so that changes to the configuration file become effective.
You could configure a page as default page (front page) using Apache, e. g. by a
| Redirect /index.html http://www.dorfwiki.org/wiki.cgi?WelcomeVisitor |
|
|
but this is less flexible than using the FrontPage parameter.
Weblinks
FolderServerAdministration FolderApache
|