How can I use options of virtualhost in directories?

25 October 2009, 16:27

Just a question: how can I do virtualhost options in directories. I want to serve and as a virtualservers.

Hugo Leisink
25 October 2009, 19:25
Just create one virtual host and move the wiki directory inside the webroot directory of that virtual host.
26 October 2009, 16:55
How can do that?

This is a example of virtual hosts: can you modify it only for wiki contain the .../wiki directory?

# It is wise to use your IP address as the hostname of the default website
# and give it a blank webpage. By doing so, automated webscanners won't find
# your possible vulnerable website.
Hostname =
WebsiteRoot = /var/www
#StartFile = index.html
ShowIndex = yes
ExecuteCGI = yes
TriggerOnCGIstatus = no
EnablePathInfo = yes
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi

# Use a VirtualHost section to declare the websites you want to host.
VirtualHost {
Hostname =
WebsiteRoot = /var/www/wiki
#StartFile = index.php
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
TimeForCGI = 5
#UseFastCGI = PHP5
#UseToolkit = banshee

Note that hostname of virtualhost is malformed: hiawatha does not allow /wiki in hostname.

Hugo Leisink
26 October 2009, 21:14
Just create a single host configuration (the default host in your config will do). Create the directory /var/www/wiki and place all your wiki files in that directory. If a browser requests, Hiawatha will search for a wiki directory in the host named Easy.
27 October 2009, 18:57
Yes, but I want:
- that user in / only see / contents (not the subdirectory /wiki) and that in /wiki the user could not up the directory
- and use virtual hosts options in /wiki different to / (for example AccessLogFile)

For these reason, I wanted to do 2 vs
Hugo Leisink
27 October 2009, 19:49
That's not possible, because that's not how subdirectories work. Not with any webserver.
25 December 2009, 17:45
this sucks:

The hostname '' contains a path
Hugo Leisink
25 December 2009, 19:13
No, it doesn't...
This topic has been closed.