Questions tagged [fastcgi]
FastCGI is an open interface web servers can use to execute applications in a secure and isolated manner.
236
questions with no upvoted or accepted answers
7
votes
1
answer
3k
views
How to debug CGI over fcgiwrap/nginx
I serve executable scripts (mainly in C) through fcgiwrap connected with nginx. Since the scripts are complied, I can get the coding errors during compilation, but sometimes I receive CGI errors ...
6
votes
0
answers
4k
views
How do I allow users to override X-Frame-Options when using Apache + PHP-FPM?
I have an Ubuntu 14.04 server running Apache + PHP-FPM + FastCGI, serving user home pages. For security, I have enabled in Apache's configuration:
Header set X-Content-Type-Options: "nosniff"
Header ...
4
votes
0
answers
3k
views
Proxy_pass vs Fastcgi_pass
With one server/container on with nginx and another one with fpm, is it better to fastcgi_pass from the nginx to the fpm or proxy_pass to the fpm with addional installtion of nginx on the fpm? Both ...
4
votes
0
answers
1k
views
Apache 2.4 + PHP-FPM + Chromelogger (how to increase HTTP header length limit?)
I have a running Apache 2.4 + PHP-FPM setup.
There is one edge case though, when this setup fails - when using Chromelogger.
Chromelogger is a server to client debugging tool, which sends it's data ...
4
votes
1
answer
1k
views
Lighttpd, Python, MySQLdb Python Module and Permissions
After restarting a lighttpd server recently I haven't been able to get it up and running again. I am running a python built API service on it, and am relying on the web.py module to run the ...
4
votes
0
answers
3k
views
php-cgi.exe and/or php5.dll crashing - PHP 5.2.17, Win2k8 & IIS7
A specific part of my PHP script crashes randomly and I'm not sure why. The only difference on this page and the rest of the pages, is that I'm doing a PDO SQLSRV call. But 80% of the time there are ...
4
votes
2
answers
2k
views
mod_headers not working for php + mod_fastcgi pages
I'm running PHP through mod_fastcgi & mod_suexec, and I added Header set X-UA-Compatible "IE=edge env=best-standards-support" to my .htaccess file. It works fine for static content, but the PHP ...
3
votes
0
answers
325
views
IIS server slows down with only a few tens of requests
I'm using IIS 7.5 with PHP and I'm having troubles with my application, it is VERY slow and it can take more than 30 seconds to respond sometimes.
I believe this is due to some kind of queue of ...
3
votes
2
answers
5k
views
Is it really possible to use PHP sessions for authentication with nginx fastcgi cache?
I have recently switched an opencart instance from Apache+mod_php to nginx+fastcgi+php-fpm. I have been trying to leverage caching for most pages through fastcgi-cache.
Unfortunately, many users ...
3
votes
0
answers
214
views
php-fpm: Maintain php_mod logging format
I recently switched all my lab servers from apache pre_fork/mod_php to apache worker/fcgi/php-fpm, and after getting everything set-up correctly, I noticed one last issue; php-fpm is adding it's own ...
3
votes
2
answers
2k
views
Setup secure shared hosting (Apache, PHP, MySQL)
So I'm setting up a shared hosting with Apache, PHP, MySQL and the biggest question mark is how to do with PHP, since there is a million options out there how to configure it securely.
The plan is:
...
3
votes
1
answer
3k
views
How to configure fastcgi with lighttpd
I am trying to configure FastCgi with ligttpd server.
I was able to run vanilla lighttpd like this:
./lighttpd -f lighttpd.conf
And then I compile/install the source of fastcgi, and I add the ...
2
votes
0
answers
303
views
Docker nginx + php performance
I am using docker-compose to run an nginx container and a PHP container. I have a performance issue, where each 4th or 5th request to a simple PHP script takes several seconds (normally <<1s).
I ...
2
votes
0
answers
728
views
mod_fcgid: can't apply process slot for - error repeats every 6 hour
On server, I run Apache via FastCGI using PHP 7.4.13:
/etc/httpd/conf.d/ is configured as this:
# Use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fcgid-script fcg fcgi fpl
# Sane ...
2
votes
0
answers
871
views
Long-running git post-receive hook causes timeout
I have a post-receive hook written in python, whose main function is to deploy the updated branch. It clones the repo into a new dir, and runs environment setups like npm install and building/...
2
votes
0
answers
340
views
Repercussions of setting the IIS responseBufferLimit to = 0
I'm running a PHP application (Moodle) under FastCGI in IIS 8.5, Windows Server 2012 R2 and PHP 5.4. There are two VM server nodes in the setup using an F5 load balancer. I am using Wincache for the ...
2
votes
0
answers
2k
views
Apache 2.4 with php-fpm ignores .htaccess
I have a VPS server with Apache, FastCGI and php-fpm installed. But, the .htaccess files seems be ignored. I have a .htaccess file that redirects http URLs to https URLs:
<IfModule mod_rewrite.c&...
2
votes
1
answer
2k
views
Nginx / git / fastcgi server not working
I set up all the needed components for a Git server on Nginx using FastCGI and followed the combined suggestions of a few tutorials to end up with this configuration:
server {
listen 80;
listen [:...
2
votes
0
answers
582
views
fastCGI sent in stderr: "Primary script unknown" while reading response header from upstream files exist
I've looked at other answers but I'm still failing to see the issue with these configs:
user nginx;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log ...
2
votes
0
answers
1k
views
PHP-FPM + Apache (403 forbidden message)
Im having trouble installing php-fpm.
When ever I install it and open a php file i get a 403 forbiden status code
Looking at the logs is see
client denied by server configuration: /usr/lib/cgi-bin/...
2
votes
1
answer
548
views
FastCGI for DocumentRoot only
I'm trying to set up HHVM for one of my websites. It is running on Apache 2.4, Ubuntu 14.04. I apologize for not being the most advanced system administrator, I am more in the software engineering end ...
2
votes
0
answers
2k
views
Apache 2.4 + mod_rewrite + FastCGI (php-cgi.exe) on Windows
I am trying to port my Mac config on Windows for some of my clients.
Since Windows is not Mac OS, I have to use php-cgi.exe instead of PHP-FPM. I have tested each component individually and ...
2
votes
1
answer
750
views
Website with no traffic takes 10 seconds to load with Nginx + FastCGI
Yesterday I had a working optimized Nginx install serving a website and it was really fast. Today I just did some tests with some extra changes in the config ( just adding a redirect ) and suddenly ...
2
votes
0
answers
1k
views
IIS and PHP with FastCGI/WinCache not seeing updated files
We have a script that regularly updates itself on a scheduled task. It downloads a ZIP, then extracts and overwrites a bunch of app files with new ones.
We're seeing many cases on IIS where the ...
2
votes
0
answers
2k
views
Understanding Nginx try_files and fastcgi_path
I'm trying to convert a very simple .htaccess file to nginx:
Options -Indexes -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
As I read on Google and ...
2
votes
1
answer
154
views
Supervisord unable to shutdown fcgi processes
I've managed to set up supervisord with fastcgi on a django project of mine, the problem is that when I make mi program stop, the server keeps running somehow, and my page keeps online.
Here is my ...
2
votes
0
answers
725
views
Serving videos (mod_h264_streaming) using lighttpd with a fastcgi authorizor causing problems
So my goal is to serve streaming video, but only after authentication. Since authentication could use one of many methods, I'm writing a fastcgi authorizer to handle them. Each part (streaming, ...
2
votes
2
answers
4k
views
How to create a very simple external FastCGI configuration in apache?
I have an externally started FastCGI application that listens on socket '/tmp/foo.sock' and a directory of static files in '/srv/static'. Apache has all needed permissions on the socket and the ...
2
votes
3
answers
4k
views
Munin graphing by CGI
I have Munin working just fine, but any time I try to do cgi graphing - it just stops graphing... no errors in the log, nothing. I've followed the instructions here: http://munin-monitoring.org/wiki/...
2
votes
1
answer
487
views
lighttpd and mod_proxy with PHP
I am trying to create a rather complex setup using a combination of lighttpd, some custom Ruby proxies, rails/ramaze (running on Thin), and PHP. Currently it is setup like this:
A browser issues the ...
2
votes
0
answers
4k
views
FastCGI connection refused on port 9000
I have a site running PHP 5.3.2 + PHP-FPM and Nginx 0.7.65 and rebooted the server after changing the root password. The web server starts up fine, but the site doesn't come up and the only clue I ...
2
votes
2
answers
2k
views
Lighttpd with FastCGI won't create /tmp/fcgi.sock on startup?
I'm running lighttpd-1.4.19 on a debian 5 box and try to run web2py with fastcgi. The problem with that is, that lighttpd does not create the socket file /tmp/fcgi.sock.
If I'm creating the file by ...
2
votes
0
answers
891
views
lighttpd + FastCGI + Mono not working with evhost enabled
I've started the migration of a Windows VPS to linode.com, choosing lighttpd over nginx and apache to host some sites built on asp.net mvc, and I'm stuck with what I think is a "document-root" ...
2
votes
1
answer
2k
views
Trying to run an ASP.NET MVC application using Mono on Apache with FastCGI
I have a hosting account with DreamHost and I would like to use the same account to run ASP.NET applications. I have an application deployed in a subdomain, a .htaccess with a handler like this:
# ...
1
vote
1
answer
56
views
Trying to use setfacl to allow script owner to delete cache file
I want to use setfacl to allow a php script owner to delete fastcgi_cache_path files that are owned by nginx. The user has been added to the nginx group.
I have tried: setfacl -d -m u:user:rwx cache, ...
1
vote
2
answers
558
views
http3 removes domain from all links
So couple days ago I installed NGINX 1.23.3 QUIC with Brotli, TLS 1.3, OpenSSL 1.1.1s with HTTP/2 and HTTP/3... so server with fastcgi and php-fpm... when I load site for first time it works with ...
1
vote
0
answers
232
views
Wordpress NGINX + FastCGI Cache, Err_too_many_requests
Have a weird situation with my Wordpress set up running NGINX and PHP8.0 with FastCGI Cache.
The site will end up in a too many requests loop, however, it doesn't happen immediately and will come out ...
1
vote
0
answers
88
views
custom fast cgi cache duration for a location
i have this configure
location ~* \.php$ {
try_files $uri /index.php =404;
fastcgi_pass phpstream;
fastcgi_index index.php;
fastcgi_cache GCache;
...
1
vote
0
answers
628
views
nginx 404 not found in subfolder
I installed a php script in /files/ subfolder on Nginx but when I access the page, it's not working. Just showing 404 not found.
I added this in the config but not working.
location ^~ /files {
if (!...
1
vote
1
answer
1k
views
How do I pass on a custom FastCGI param value onto an NGINX variable?
Using the FastCGI module allowed me to pass on server variables directly onto my PHP application through the use of param. What I'm hoping to do next is record one of these params onto my NGINX access ...
1
vote
0
answers
2k
views
nginx 502 error for api call from application but working in postman and curl request
Environment:
Laravel Version: 5.8.29
PHP Version $ php --version: PHP 7.2.24 (cli)
NGINX Version $ nginx -v: nginx version: nginx/1.14.0 (Ubuntu)
Problem Statement:
Everything works fine, except for ...
1
vote
0
answers
471
views
PHP FastCGI Process Manager (FPM) on IIS
Is there a way to enable fpm-fcgi sapi on IIS? I'm aware that the default SAPI for PHP on IIS is cgi-fcgi.
1
vote
1
answer
1k
views
Make nginx wait x seconds before returning a 502
I think fastcgi_read_timeout is what I need here, but would like to get expert confirmation on my use-case! Thanks.
--
I have nginx doing fastcgi relay to a php-fpm instance.
The fpm instance, ...
1
vote
1
answer
1k
views
Loading css from cgit on nginx in a subdirectory
before I start I should note that I have absolutely no experience with nginx or networking, so what I have done was thanks to searching and trying different solutions.
I have a problem I struggle ...
1
vote
0
answers
450
views
git-http-backend blocking with fastcgi on nginx
I have git-http-backend serving git repos through an nginx fastcgi proxy. The nginx config looks like:
server {
listen 443 ssl;
server_name git.example.com;
...
1
vote
1
answer
1k
views
Nginx - rewrite fastcgi_param for one specific route
I want to change fastcgi_param only for specific routes as described below:
server {
# (...)
# PHP entry point for main application
location ~ ^/(index|get|static|errors/report|errors/...
1
vote
0
answers
261
views
Apache2 executes PHP only implicitly, not when explicitely opened
I am facing a rather strange behavior. I have placed a simple phpinfo test script (see below) as index.php in the root directory of my domain. When I open it as www.example.com in the browser, it ...
1
vote
0
answers
1k
views
nginx pfp-fpm - "No input file specified." when serving files from /home/user/**
I have a setup where the user uploads multiple PHP sites to a projects folder in the user's home directory (/home/{user}/projects). And the sites are individually configured; serving things like ...
1
vote
0
answers
1k
views
PHP FastCGI reading php flags from .htaccess? How?
I'm doing some changes on a website hosted on a managed dedicated server from Hetzner and I found that somehow some php flags set in .htaccess are passed to PHP running as fastCGI. As far as I was ...
1
vote
0
answers
246
views
Does httpd reload always kill child fast cgi processes?
I have a large number of fast cgi scripts on a server and when we deploy new scripts we run a systemctl reload httpd since some of our scripts may have changed or underlying data may have changed.
...