Recent

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

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • 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?
Be mindful and excellent with each other.
https://github.com/cpicanco/

zamronypj

  • Full Member
  • ***
  • Posts: 133
    • 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
Apache module executes Pascal program like scripting language https://zamronypj.github.io/mod_pascal/
Github https://github.com/zamronypj

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • 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: 14205
  • Probably until I exterminate Putin.
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.
Specialize a type, not a var.

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • 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.
Be mindful and excellent with each other.
https://github.com/cpicanco/

nouzi

  • Sr. Member
  • ****
  • Posts: 296
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

 

TinyPortal © 2005-2018