Greetings,
I am impressed with the Hiawatha web server feature set and would like to replace my lighttpd implementations with it. But I am having difficulty to connect php fast-cgi server with the Hiawatha. I have read the HOWTO's, and forums and googled around, but I am still unable to solve this issue.
My fast-cgi server processes are respawned by php-fcgi at 127.0.0.1:9000 [verified with ps -ef]
Server = /opt/php5/bin/php-cgi ; 127.0.0.1:9000 ; www-data ; /etc/php5/php.ini
I have Hiawatha configured at a proprietary port 9929 with following binding:
Binding {
Port = 9929
MaxKeepAlive = 30
TimeForRequest = 3,20
SSLcertFile = hiawatha.pem
}
The fastCGI server has been configured to run on the same hardware:
FastCGIserver {
FastCGIid = PHP01
ConnectTo = 127.0.0.1:9000
Extension = php
}
I have special protected directory with digest authentication:
Directory {
Path = /var/www/mine/protected
PasswordFile = digest:/etc/hiawatha/.passwds
}
The default website has been configured with:
Hostname = 10.0.0.12
WebsiteRoot = /var/www
StartFile = index.php
...
UseFastCGI = PHP01
A virtual host has been configured as:
VirtualHost {
WebsiteRoot = /var/www/mine
Hostname = my.domain.com
StartFile = index.php
...
RequireSSL = yes
UseFastCGI = PHP01
ShowIndex = yes [for testing purposes ]
}
PROBLEMS:
When accessing website with ip url: https://10.0.0.12:9929 the /var/www/index.php gets processed perfectly using the FastCGI server. When accessing the website using the url: my.domain.com:9929, the same file at /var/www/index.php gets processed -> PROBLEM: the index.php at /var/www/mine/index.php should have been processed instead.
[DNS records point to 10.0.0.12 for my.domain.com..]
Further, when accessing the url: https://my.domain.com:9929/protected/ the directory listing is shown correctly from /var/www/mine/protected after the browser password prompt, but when trying to access the index.php visible on the directory listing -> PROBLEM: the server response is 404 Not Found. (index.php is available in that directory with very liberal 0777 access).
I did place index.htm at the same /protected directory and accessing that works fine. So I have tried to narrow down the problem to fastCGI settings, but can't figure out what is causing this.
Hiawatha version: Latest with php-fcgi
Operating System: Ubuntu 8.04