Gossamer Forum
Home : Products : Gossamer Links : Discussions :

LSQL under FastCGI

Quote Reply
LSQL under FastCGI
Hi,

There is a thread with the above title and a statement from Alex:
Alex wrote:
Hi,

No, its never been tested under FastCGI. Remarkably, we've never had a client using it, it's always been mod_perl or SpeedyCGI. I don't think it would be too hard, you would just want to do:

while (...) {
$GT::Base::PERSIST = 1;
Links->reset_env;
main();
}

and it should work fine.

Cheers,

Alex
That alone does not help me to get the right direction so my question is: has anyone running LSQL under FastCGI and/or can give me some hints if and how this is possible.

Thanks

n||i||k||o

Last edited by:

el noe: Jun 1, 2018, 2:28 AM
Quote Reply
Re: [el noe] LSQL under FastCGI In reply to
Hi,

I can't say I've ever used it on FastCGI, so can't offer much help. Is there any reason you are going for that compared to mod_perl? I've always found mod_perl more than fast enough (and can handle a LOT of traffic)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] LSQL under FastCGI In reply to
Hi Andy,

Thanks for your reply. I am playing around with a nginx server where I have a couple of applications running and I wanted to run an installation of LinksSQL there. As far as I understand mod_perl and speedycgi is associated with Apache and neither is available under nginx.

Cheers

n|i|k|o

Last edited by:

el noe: Jun 1, 2018, 10:18 AM
Quote Reply
Re: [el noe] LSQL under FastCGI In reply to
Hi,

All I do in that case, is have nginx as the front end (doing static files, and PHP). Then have Apache 2.4 setup on port 8181 as the backend or running the Perl scripts. An example would be:

nginx config:

Code:
location ~ \.cgi$ {
try_files $uri =404;
gzip off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8181;

}

Then in your Apache config for the domain:

Code:
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
....
ScriptAlias /cgi-bin/ /home/ibrahim/web/domain.com/public_html/cgi-bin/
....
<Directory "/home/ibrahim/web/domain.com/public_html">
Options MultiViews FollowSymLinks
AllowOverride AuthConfig
Require all granted
AddHandler cgi-script .cgi .pl
Options +ExecCGI
Options FollowSymLinks
</Directory>

I do this kind of setup on all my servers now (I use VestaCP). If you would like me to send you my install script and instructions on how I setup the server, let me know and email address and I can send that to you :) (it takes about 30-60 minutes to do, but it will have you up and running with nginx / apache very fast)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] LSQL under FastCGI In reply to
Thanks a lot, that sounds great. PM is on its way.

Cheers

n||i||k||o