Dear Hugo,
thank you for this clean and well documented software. Excellent!
I'm using Hiawatha with phpfpm on my embedded system to serve HTML content with PHP for a GUI. This works great.
Additionally, I want to serve RESTful HTTP requests on the same target, by using FastCGI with a C application, because of performance needs (PHP is no-go).
My intention is to access the GUI at e.g. 192.168.1.0/gui/ and the RESTful API at 192.168.1.0/api/ on the target.
Having an embedded system, I don't use virtual hosts. Here is an excerpt of my hiawatha.conf file:
Binding {
Port = 80
Interface = 0.0.0.0
}
FastCGIserver {
FastCGIid = phpfpm
ConnectTo = 127.0.0.1:9000
Extension = php
}
UrlToolkit {
Match ^/gui/.*\?(.*) Rewrite /gui/index.php?$1
Match ^/gui/.* Rewrite /gui/index.php
Match ^/.* Rewrite /index.html
}
Hostname = 127.0.0.1
WebsiteRoot = /usr/local/var/www/data
UseFastCGI = phpfpm
This works fine, even if the IP address of the interface is reconfigured manually or by DHCP.
But how to handle phpfpm / PHP and fastcgi / C application in parallel on the host, with the request URIs as mentioned before?
Any help is kindly appreciated.
Thanks,
Carsten
Hiawatha version: 9.2
Operating System: ARM, Linux