Recent

Author Topic: How to deploy a fphttpapp (standalone) web app from an apache server?  (Read 1394 times)

cpicanco

  • Sr. Member
  • ****
  • Posts: 465
    • My Portfolio
Hi guys, is it possible to deploy a fphttpapp (standalone) web app from an apache server? If yes, in what scenarios you would do it? What would be the main benefits compared to Fast CGI/ CGI?

zamronypj

  • New Member
  • *
  • Posts: 42
    • Fano Framework, Free Pascal web application framework
Re: How to deploy a fphttpapp (standalone) web app from an apache server?
« Reply #1 on: August 17, 2019, 10:44:26 pm »
If fphttpapp web app is running in same machine as Apache web server, it is possible as long as both listen on different port.

Benefit of deploying fphttpapp is less software layer, requests come directly to web app. So there are possible performance benefit depending on how you develop web app. This is not the case with fastcgi/cgi web app as requests are received by Apache and then pass to mod_fcgid/mod_proxy_fcgi/mod_cgi module then to web app.

The benefit using fastcgi/cgi with capable web server such Apache is that many security issues/attacks may already be handled by Apache so less possible attacks to worry. this is not the case when deploying fphttpapp standalone.
Fano Framework, Free Pascal web application framework https://fanoframework.github.io
Personal Projects https://v3.juhara.com
Github https://github.com/zamronypj

Leledumbo

  • Hero Member
  • *****
  • Posts: 8114
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to deploy a fphttpapp (standalone) web app from an apache server?
« Reply #2 on: August 18, 2019, 04:26:47 am »
Hi guys, is it possible to deploy a fphttpapp (standalone) web app from an apache server? If yes, in what scenarios you would do it? What would be the main benefits compared to Fast CGI/ CGI?
Why not? In my company, we use nginx as reverse proxy because fphttpserver doesn't implement what a standalone web server does, like domain resolution and caching, for instance. Apache should be able to do the same. The benefit is similar with FastCGI, that is the web server is long running hence require much less initialization and once up only needs to handle incoming requests directly. Speedwise, it might be simpler than FastCGI since no additional protocol involved. As a reverse proxy, all that the standalone web server does is delegate the request handling, nothing more.

Thaddy

  • Hero Member
  • *****
  • Posts: 9278
Re: How to deploy a fphttpapp (standalone) web app from an apache server?
« Reply #3 on: August 18, 2019, 09:12:46 am »
Another scenario that I use is for remote status reporting of certain software and hardware. There a full-featured server is overkill.
also related to equus asinus.

cpicanco

  • Sr. Member
  • ****
  • Posts: 465
    • My Portfolio
Re: How to deploy a fphttpapp (standalone) web app from an apache server?
« Reply #4 on: September 01, 2019, 09:51:13 pm »
Thank you for your insights guys. So, it is possible and desirable for performant systems and when you can manage all intricate security concerns.

I thought about this question reading Marcus Douglas' post showing how one can develop cgi projects locally without an external web server.

https://objectpascalprogramming.com/fpweb-hello

Right now it seems to me that this post shows a workaround that can reduce costs in the development cycle.

nouzi

  • Full Member
  • ***
  • Posts: 142
my english is  bad
Lazarus 2.0 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : windows 7 64bit