Questions tagged [fastcgi]

FastCGI is an open interface web servers can use to execute applications in a secure and isolated manner.

Filter by
Sorted by
Tagged with
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/...
0 votes
0 answers
57 views

FROM php:7.4-fpm-alpine app.dockerfile results in fastcgi error when adding sh file to run as an entrypoint

I am using AWS ECS Faragate to generate and deploy docker containers into tasks. I'm using the docker image FROM php:7.4-fpm-alpine for my app container. I have been working on a workaround for cron ...
1 vote
1 answer
91 views

Apache: 500 error, PHP fails on just one specific path

I need another pair of eyes to help debug an issue. This will be a long message. I'm going to provide a lot of context because I'm not sure which details might be important. We have two servers: dev, ...
0 votes
1 answer
8k views

HAProxy -> nginx -> Fast CGI: epoll_wait() reported that client prematurely closed connection

I have been successful in setting up an PHP fast CGI application fronted by nginx. If I hit nginx directly everything works as expected. However, in production the traffic is routed through a HAProxy ...
1 vote
2 answers
16k views

How to configure fastcgi to work with ligttpd in ubuntu

I am able to run lighttpd on ubuntu 9.10. But when i tried to setup fastcgi with lighttpd by putting this in the ligttpd.conf file: #### fastcgi module fastcgi.server = ( "/fastcgi_scripts/" => ...
1 vote
2 answers
4k views

Temporarily website outages, fastcgi PHP communication aborted

I've noticed that my web server has occasional 1-5 minute outages every day. I've checked the Apache error log and found the following: [Sun May 10 14:13:19.299784 2015] [fastcgi:error] [pid 2599:...
0 votes
0 answers
30 views

Trouble using nginx location block to exclude certain files from fastcgi cache

I've searched and tried lots of iterations of an nginx location block to exclude certain files from the fastcgi cache, but I can't get it to work. I understand using a location block is preferable to ...
0 votes
2 answers
10k views

fastcgi php and memory limit

I have a web server apache 2.2 with fastcgi and php 5.3, I have memory limit set to 256MB in php.ini and with php-cgi -i I got 256MB. So the configurations is correct, my process read it without ...
0 votes
1 answer
93 views

Tell Nginx not to cache based on a response header from upstream

I'm using Nginx to serve MediaWiki, and I use FastCGI caching to avoid unnecessary PHP calls. (In the MediaWiki LocalSettings.php file, I have $wgUseCdn = true; and in the Nginx config, I use ...
2 votes
1 answer
2k views

Can't get nginx to run php on ubuntu 16.04 server

I am setting up a server running nginx and I'm trying to get it to run php scripts. Apparently the greatest article on how to get nginx to run php is this one: https://www.digitalocean.com/community/...
0 votes
0 answers
49 views

Routing requests to cgi with nginx

I'm having trouble translating an application controller routing setup from Apache to nginx without using if , which is strongly discouraged. What I want: serve requests for static files as-is if they ...
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 ...
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, ...
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 ...
1 vote
2 answers
623 views

Redirect to specified .php file with try_files if requested .php file not found?

Using nginx I would like to redirect to /redirect.php with try_files if required .php file not found, is it the right way to do so: location ~ \.php$ { ... fastcgi_split_path_info ^(.+\.php)(/...
-1 votes
1 answer
108 views

open() "/var/lib/nginx/cache/fastcgi/3/d0/bce7bdb8e2c388c7675c97c7324efd03" failed (13: Permission denied)

I am trying to add Caching for Proxy & FastCGI but once i try to view any page on the site it fails with 500 Internal Server Error and when i tried searching my logs for any errors i found that ...
0 votes
0 answers
18 views

Do I need a fastcgi development library in addition to mod_fcgid?

Do I need fastcgi development libraries in addition to mod_fcgid. I will use mod_fcgid together with Wt (web toolkit). Cmake files of Wt is searching for an include directory for the file fcgio.h and ...
2 votes
0 answers
298 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 ...
1 vote
2 answers
4k views

"<handler> scriptProcessor could not be found in <fastCGI> application configuration" when accessing PHP script in subfolder

I have a configuration problem with php on IIS 7.5. It is a practically fresh install made with the MS Web PI on Win7. I created a simple php testpage. It works in the root level http://localhost/...
1 vote
1 answer
323 views

How can I curl -IL all the website pages starting with the root pagenot just 1 page at the time?

I need to curl -IL all the website and maybe do cron job or something every 24hrs so fastcgi can cache all the pages on vgo The cache don't hit unless I curl -IL the webpage so I need something that ...
1 vote
0 answers
225 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 ...
0 votes
1 answer
251 views

Nginx FastCGI Skip Cache Rules for /shop/ in Wordpress woocommerce, why aren't they working?

I am running a LEMP server with Wordpress and Woocommerce. My site is live at https://www.mcmo.is. My Nginx Skip Cache rules seem to be working except for on one page: https://www.mcmo.is/shop When ...
1 vote
1 answer
108 views

Nginx: rewriting while checking args format with a regex

I have an API endpoint like /my/api/PARAM1/abcd?arg1=val1&arg2=val2, and use a redirect to proxy to a fastcgi server elsewhere (using upstream). Basically I have the current configuration : ...
0 votes
0 answers
258 views

What is the proper value of "fastcgi_split_path_info" in Nginx virtual host when using php 7.4 with "cgi.fix_pathinfo = 1" on Nginx v1.25.1 Mainline?

BACKGROUND: I am running a LEMP server with Ubuntu Server 20.04 with Nginx v1.25.1 Mainline and php7.4-fpm. In my virtual hosts file I am trying to set the proper and working fastcgi_split_path_info ...
0 votes
1 answer
288 views

Fastcgi script "file not found" / Primary script unknown

ACTUAL SITUATION I am in the process of transferring a static web server to a container. ISSUE ENCOUNTERED When i'm trying to reach my server, i received "File not found" with : curl ...
0 votes
1 answer
153 views

opensuse php fpm lighttpd 403 is it a permissions-issue

So far I have configured php-fpm configured and is up and running listening to port 9000 lighttpd is running and serves static files the problem that I have seems to be a permissions issue, so i chmod ...
11 votes
3 answers
53k views

nginx fastcgi "Primary script unknown" when configuring userdir

I hate configuring nginx. It's so complicated. How do I get PHP to work in my user dirs? Here's the relevant part of my nginx.conf: location ~ ^/~(.+?)(/.*)?$ { autoindex on; ...
1 vote
2 answers
544 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 ...
2 votes
1 answer
589 views

nginx route all 404 requests to a php script

I want to route all 404 requests to a php script, How should I do that? My nginx config is: server { listen 81; listen [::]:81; root /srv/http/paste.lan/www; autoindex on; ...
0 votes
1 answer
409 views

Nginx FastCGI cache is EXPIRED when it should not

Nginx sets the x-fastcgi-cache header to EXPIRED a few hours after the page was first cached, whereas the cache validity is 1 week. Nginx Config: fastcgi_cache_path /usr/share/nginx/fastcgi_cache ...
18 votes
3 answers
14k views

Should I impersonate PHP via FastCGI?

I am installing the latest version of PHP onto IIS 7.5 via FastCGI, and all of the instructions say that FastCGI should impersonate the calling client by setting fastcgi.impersonate = 1 If my ...
0 votes
0 answers
99 views

Site with subdomains in redirect loop - Nginx configuration Issues

this is the website (the website also have subdomains) nginx configuration: # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to ...
0 votes
1 answer
156 views

[Wordpress][CACHE] Fastcgi_cache or proxy_cache?

I'm preparing a server to host a classic WordPress site (lots of dynamic content). I have an apache server associated with a Nginx reverse proxy ( with the proxy_pass configuration ). I have several ...
4 votes
5 answers
57k views

Make PHP-FPM Listen at 'IPAddress:Port' Instead of '/var/run/php5-fpm.sock;'

As I was load testing my site today (using blitz.io); despite lots of RAM (more than 50%) and CPU power (over 70%) available, results showed that my site started timing out at a certain number of ...
0 votes
1 answer
110 views

cgi/fastcgi 0% CPU and N% Memory?

I have php wordpress website hosted on IIS, have been using FastCGI, below is my fastCGI configuration Below is screenshot of task manager There are many fastCGI processes that are using 0% CPU but ...
0 votes
0 answers
746 views

python.exe - The FastCGI process exceeded configured activity timeout

I'm trying to host a Flask (Python) application on a Windows server, but it was giving me request timeout error, then I changed it to 300 seconds (5 minutes), and after that, it's giving me an ...
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 [:...
0 votes
0 answers
121 views

FastCGI cache and WordPress, is the cache skip for querystrings really needed?

I'm just making a few test on FastCGI cache and I see that the suggested .conf have this directive: if ($query_string != "") { set $skip_cache 1; } This will bypass the cache for every ...
0 votes
0 answers
376 views

IIS FastCGI configuration for high concurrency

I am hosting, on Windows Server 2022, a web application that makes regular ajax calls to a PHP backend. The calls themselves are quite light, just pulling and pushing data from and to a MySQL db. Over ...
1 vote
2 answers
2k views

Remove index.php from Nextcloud urls, using Apache+fastcgi

I installed Nextcloud on my Webfaction web space, and want to remove the "index.php" in the URL. I followed the instructions here, but then realized that it says: Furthermore these instructions are ...
1 vote
1 answer
2k views

php-fpm: locale settings change themselves

I experienced a bug with php-fpm : locale settings change themselves randomly. Here are the correct locale settings: Array ( [decimal_point] => . [thousands_sep] => [...
0 votes
1 answer
2k views

Nginx/php-fpm timeouts

I have a setup that consists of a load balancer, two web servers running nginx/php-fpm7.1 and a database server running mariadb. For the past few months I have been struggling to work out the cause ...
0 votes
1 answer
2k views

nginx - PNG files going through fastcgi?

While facing the following error below I noticed that it appears the PNG file is going through fastcgi. I'm not very familiar with nginx, but it seems wrong to me. I did try putting some PHP code in ...
1 vote
1 answer
5k views

Ubuntu 22.04 php8.1-fpm wifth Apache - 403 Forbidden You don't have permission to access this resource

I installed php8.1-fpm on Ubuntu 22.04. In principle, I set everything up, but still "403 Forbidden You do not have permission to access this resource "error message is displayed. The system ...
0 votes
1 answer
1k views

Nginx FastCGI Error in logs: 38 FastCGI sent in stderr: "PHP message: PHP Warning: hash_equals(): Expected known_string to be a string

I am running a LEMP server (Ubuntu 20.04 server) with fast cgi enabled, and am getting the following error message in the logs for one of my virtual hosts (one of my websites). Here is the full error ...
0 votes
1 answer
2k views

php/mod_fcgid script terminating after 30 seconds

I have the following issue : When running a long-running php script (file upload) it timeouts after exactly 30 seconds of activity. Bizzarely, it only occurs in certain cases - the one i know for sure ...
7 votes
1 answer
5k views

Create FastCGI application with PowerShell

I'm trying to automate the provisioning of a Windows 2012 server, but I'm having trouble getting PHP to work. This is the command I'm using to add a handler mapping to IIS: New-WebHandler -Name "PHP-...
24 votes
3 answers
71k views

Nginx $document_root$fastcgi_script_name vs $request_filename

I can't notice any difference if in my config file I set fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Or: fastcgi_param SCRIPT_FILENAME $request_filename; What do ...
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
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 ...

1
2 3 4 5
15