Am 23.08.2012 22:09, schrieb Knud Sørensen:

Hi

I have some virtual host questions.

How does one run more than one virtual host with vibe ??

I have noticed vibedist but the README is very short and the is no examples.

Also is it possible to run a vibe virtual host alongside a apache
virtual host, if it is then how ??

Thanks, for vibe and hope you can help.
Knud

Basic virtual hosts are done by simple calling listenHttp() multiple
times with different values for HttpServerSettings.hostName and the same
port.

For running an apache vhost alongside a vibe vhost I would recommend to
use nginx and configure the vhosts there to forward using a reverse
proxy. Last time I checked, Apache didn't support HTTP/1.1 for its proxy
module which would be necessary to let Apache do that directly.

Alternatively, it is also possible put the vibe.d server in front of
Apache by calling listenHttpReverseProxy() with Apache as the
destination and Apache's vhost name in the HttpServerSettings.hostName
field. I still get a sporadic exception that causes the proxy to quit
though - and still waiting for it to be able to track it down. So for
robustness reasons either a watchdog script or the nginx way would
probably be in order.

vibedist still needs some finishing touches to be really useful but I
got stuck when I was somehow forced to start making my own std.process
replacement and then heard that there was a new one in the works
anyways. However, When that part is finished, it will provide a web
frontend and a watchdog to manage and monitor the individual virtual
hosts as separate processes. It will then also get some proper
documentation.

Regards,
Sönke