Forum

hiawatha does not load index.php

V Patel
16 February 2017, 17:26
Hello. My hiawatha configuration file is as follows:
ServerId = www:www
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
ServerString = none
LogFormat = extended
SocketSendTimeout = 30
WrapUserCGI = yes
WorkDirectory = /tmp/hiawatha

Binding {
BindingID = SSL
Interface = server.ip.add.ress
Port = 443
MaxKeepAlive = 30
TimeForRequest = 3, 20
MaxRequestSize = 4096
TLScertFile = /etc/ssl/host_fqdn.pem
}

CGIhandler = /usr/bin/php-cgi:php

FastCGIServer {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:9000
Extension = php, php5
SessionTimeout = 60
}

# DEFAULT WEBSITE
# 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 = 127.0.0.1
WebsiteRoot = /var/www/hiawatha
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log

VirtualHost {
Hostname = host_fqdn
RequiredBinding = SSL
RequireTLS = yes
WebsiteRoot = /var/www/host
StartFile = index.html
AccessLogfile = /var/log/hiawatha/host_access.log
ErrorLogfile = /var/log/hiawatha/host_error.log
ExecuteCGI = no
UserWebsites = no
ShowIndex = no
TimeForCGI = 25
UseFastCGI = PHP5
Alias = /help:/var/www/osticket
}

Directory {
Path = /var/www/osticket
StartFile = index.php
ExecuteCGI = yes
}

When I browse to https://host_fqdn I get the index.html file for that site. However I get 404 error when I browse to https://host_fqdn/help. I also tried commenting out the StartFile options in the configuration file and instead placing them in .hiawatha files in the two directories (/var/www/host and /var/www/osticket). But that does not work either. Any thoughts on what I am doing wrong?

I am running Hiawatha 10.4 on a CentOS 7 system with php5 and php5-fpm.
V. Patel
16 February 2017, 20:43
I should note that https/host_fqdn/help/index.php works just fine.
Joe Schmoe
16 February 2017, 21:17
Try using a virtual path in your Directory section:
Directory {
...
Path = /help
...
}
Hugo Leisink
17 February 2017, 14:06
Change the StartFile setting for that directory via a Directory{} section in the main configuration of via .hiawatha file inside that directory.
V. Patel
20 February 2017, 19:51
Hello. Thanks for the pointers. The virtual path suggestion did not work. I thought I did specify StartFile setting in Directory section. I also added .hiawatha file in the actual location (/var/www/osticket/.hiawatha) with the following contents:
Directory {
StartFile = index.php
ExecuteCGI = yes
}

but this did not work either.
chapchap70
24 February 2017, 17:31
Your Virtual Host StartFile is index.html? Try changing it to:
StartFile = index.php
This topic has been closed.