vibe.d Subdirectory?

Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 15 11:49:33 PST 2015


On Thursday, 15 January 2015 at 14:38:16 UTC, Steven 
Schveighoffer wrote:
> On 1/14/15 11:31 AM, Laeeth Isharc wrote:
>
>> To be very clear: in the simple case when you compile your vibe
>> application from multiple source files and diet templates etc, 
>> and you
>> will end up with an executable.  This can act as a server 
>> directly, or
>> you can make it an internal server on localhost called by php, 
>> or you
>> can call it from nginx as a CGI type application depending on 
>> the URL.
>
> Pardon me for asking kind of a side question, but is there any 
> online information on how to do this? I am contemplating 
> migrating my in-house php-based application to vibe.d, but I 
> wondered if I have to do it whole-sale (not much gratification 
> until the whole thing is done) or piecemeal (then some parts 
> are php, some are vibe.d, until whole thing is ported). I 
> thought I could do the latter, but I don't know how to interact 
> apache/php with vibe.d. The biggest question I have is how 
> vibe.d and php can share session data. But I also have no idea 
> which server should be in front, and how to call one another ;)


It may be that you have a reason for going with apache, but in 
case you have not looked into it (or the situation has changed 
since you last looked), you might consider nginx as a front end 
given better stability and performance.

If you make D read the PHP authentication then you need to write 
a new auth  scheme when you have gotten rid of PHP.  So it might 
be worth at some point considering moving this to an external 
service called by both D and PHP when  you can do so without 
breaking anything.

This might be worth a read:
http://merbist.com/2012/04/04/building-and-implementing-a-single-sign-on-solution/




More information about the Digitalmars-d-learn mailing list