Runnng Hiawatha from different directory

13 October 2010, 21:34
Hiawatha version: 7.3
Operating System: Windows XP

I want to run Hiawatha from other directory than c:\Program Files\Hiawatha\

It seems that directory is required. I chnged all paths in configuration to be relative to current directory I am starting server from, but it fails. Server reports it cannot find file, but it doe snot say which one, and it doe snot even write any log.

Is it possible to set configuration so server would run from current directory regardless where it is?
13 October 2010, 21:39
It seems server always loads config from /cygdrive/c/Program Files/Hiawatha/config
Reading hiawatha.conf regardles of the current position of exe.

13 October 2010, 21:52
Does not work even if I use -c parameter. IT does recognize specified path and finds configuration file tehre, but regardless it tries to load configuration from /cygdrive/c/Program Files/Hiawatha/config
13 October 2010, 22:07
I managed to run server.

Here is Hiawatha.bat


"wigwam.exe" -q -c ..\config\
"hiawatha.exe" -d -c ..\config\



It runs from custom directory and gets configuration on relative path.

Problem is that server requires full path in hiawatha.conf. Relative paths are reported as syntax error in config file.

This should be considered as bug.
Hugo Leisink
13 October 2010, 22:11
If you want Hiawatha to be placed in a different location, download the source and build it with different settings. You need Cygwin for that. Settings are placed in extra/cygwin_config.h. Compile via
make win
13 October 2010, 23:25
Another problem related to this is when I try to load server as service it fails if path to configuration is specified. U used this command

cygrunsrv.exe -I hiawatha -d "Hiawatha webserver" -f "Secure and advanced webserver" -p "c:\hiawatha\bin\hiawatha.exe" -a "-d  -c c:\hiawatha\config\"

If I rmove configuration path, server loads, but only if config file exists in c:\Program Files\Hiawatha\config\
Hugo Leisink
13 October 2010, 23:51
Recompile as I mentioned in my previous post.
15 October 2010, 18:33
Thanks for the information, I had the same issue, want to move Hiawatha it to another directory
29 October 2010, 12:55
I can use it in default directoru (Program Files). That is no a big issue, althrough I would like to have it outside of Program Files.

My goal was to note author that there are hardcoded paths that should be configurable without need to recompile application.

In meanwhile i also noticed that it writes hiawatha.log into C:\Program Files\Hiawatha\var\log\ instead of C:\Program Files\Hiawatha\log\ and that cannot be changed through configuration, too.
Hugo Leisink
29 October 2010, 16:55
Many default paths can be overridden in the configuration file. Via the -c option, you can specify the path of the configuration file. What are you missing?

When you are compiling Hiawatha for Windows yourself, edit your settings in extra/cygwin_config.h and compile via:
make win
This topic has been closed.