Questions tagged [fastcgi]
FastCGI is an open interface web servers can use to execute applications in a secure and isolated manner.
746 questions
0 votes
1 answer
90 views
How to host the same folder in IIS using two different PHP versions?
I have a folder running a PHP application configured in IIS. Here's the current setup: Site Name: Original Website PHP Manager > PHP Version: 7.0 Bindings: * on ports 80 and 443 Handler Mappings: ...
0 votes
0 answers
39 views
If using a wordpress cache purge plugin, what should permissions and ownership of the Nginx FastCGI Cache folder be when caching files on a ramdisk?
I am runnning an Ubuntu 24.04 LEMP server with Nginx, and Nginx FastCGI Caching. I have 3 wordpress websites, and am using the Nginx Cache Purge Preload plugin for Wordpress. I am caching to a ramdisk ...
0 votes
0 answers
70 views
Nginx locations with a regex not working with fastcgi
I have the following in my nginx.conf which works: location /drupal-contrib/web { absolute_redirect off; try_files $uri /drupal-contrib/web/index.php?$query_string; ...
1 vote
1 answer
177 views
Why does IIS misidentify my user account when using IWA with Negotiate?
Apologies if this question swings wide of the mark; I'm trying to troubleshoot something out of my area of expertise. I recently migrated an internal-facing web app to IIS. I also enabled Windows ...
0 votes
0 answers
57 views
Why is path_info broken with fast cgi on apache 2.4
I have an apache server setup to run php for some websites, and perl cgi scripts for others. However, the perl scripts are performing poorly during search engine indexing and causing issues. I'm ...
0 votes
0 answers
128 views
FastCGI cache always shows MISS
I setup FastCGI cache for my server running nginx and wordpress using this guide. It seems to miss the cache everytime. The specific server config is as below. What am I missing? server { ...
0 votes
1 answer
103 views
How to setup Drupal in Subfolders on Subdomain using Nginx Server and Docker containers
I want to run a drupal installation on a subdirecory of a subdomain. I am using docker containers as I am running various services and through that I can stick to the same syntax and setup structure. ...
1 vote
2 answers
162 views
Nginx could not find FastCGI UNIX domain socket
I have a FastCGI application listening on a UNIX socket at /tmp/web.socket. srw-rw----. 1 nginx nginx 0 Aug 14 15:48 /tmp/web.socket As the nginx user, I am able to access this socket: [nginx@he4]:~$ ...
0 votes
1 answer
499 views
Nginx + Fastcgi - adding a timeout for a specific route
I have a PHP Symfony application behind nginx/php-fpm - I would like to add a fastcgi timeout, but only for a specific endpoint. Here is what I tried. server { listen 80; server_name _; ...
0 votes
1 answer
146 views
Understanding mod_fastcgi apache2 module
I'm working in a Ubuntu 22.04.3 LTS I'm creating my own apache "arquitecture". I called it "myApache". The idea is that every user can run its own apache listening in its UID as ...
2 votes
1 answer
273 views
NGINX Autospawning of FastCGI Perl Scripts
For the last several years, I’ve been using a setup of NGINX as a reverse proxy that passes any dynamic content requests to Apache. Apache then uses mod_fcgid to autospawn FastCGI-enabled Perl scripts ...
1 vote
1 answer
358 views
How to start spawn-fcgi socket via systemd in Ubuntu?
I'm using spawn-fcgi for a site on nginx in ubuntu. I start the socket with the following command: spawn-fcgi -s /var/run/fcgiwrap.sock -M 755 -u www-data -g www-data /usr/sbin/fcgiwrap How can I ...
0 votes
2 answers
903 views
Can’t run fcgiwrap and set permissions when installing bugzilla on ubuntu + nginx
I'm trying to install bugzilla on ubuntu + nginx and because I'm not a Linux expert, I encountered a problem at a certain stage. I did everything according to the instructions, and when I try to ...
0 votes
0 answers
243 views
How to run Anaconda environment on IIS with WFASTCGI?
I have developed a web application in Python using the bottle framework. I have a Windows Server, and I used IIS as Web Server for my application, using WFASTCGI. My application requires packages to ...
1 vote
1 answer
860 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
544 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 ...
1 vote
1 answer
102 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, ...
-2 votes
1 answer
197 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 ...
2 votes
0 answers
424 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 ...
0 votes
1 answer
843 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
377 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 : ...
1 vote
0 answers
883 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
649 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 ...
2 votes
1 answer
1k 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
722 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 ...
1 vote
1 answer
1k 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 ...
0 votes
0 answers
122 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
352 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 ...
2 votes
2 answers
849 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 ...
0 votes
1 answer
191 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
1k 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 ...
0 votes
0 answers
156 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
656 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 ...
0 votes
1 answer
2k 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 ...
1 vote
0 answers
346 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
835 views
Nginx - fastcgi cache not working for rewrite enabled php page
I've been trying to figure out why Im failing to achieve fastcgi caching for a rewrite rule applied php page. While all other request wonderfully cache, the rewrite ^(.+)/special/?$ /inc/special....
0 votes
1 answer
88 views
Is include() cached with fastcgi?
I have a script like this script.php <?php include "data/package.php"; echo $package[0]["name"]; echo "Hello World"; ?> and i do cache false with this map $...
1 vote
0 answers
109 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
760 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 (!...
0 votes
1 answer
203 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 ...
0 votes
2 answers
802 views
Nginx downloads source code instead running it with PHP-FPM over Docker
I'm creating PHP backend app using Docker alpine-nginx, I need to redirect all requests starting with /api to run www/index.php file as it's built on MVC framework. Proxy_pass works great for the rest ...
1 vote
1 answer
7k 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 ...
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 ...
0 votes
1 answer
232 views
The tmpfs size seems to be allocated abnormally
I am running WordPress on a vps server with 2 cores and 4 gigabytes of RAM. On the server I installed Ubuntu 20.04 + Nginx + Php7.4 + mariadb. And I recently saw an article about fastcgi and changed ...
0 votes
1 answer
468 views
HAProxy downloads PHP files instead of displaying in browser
I have nginx and php-fpm running on Docker. When using the hostname of my Docker system (docker1.freekb.net), the phpinfo.php page displays in the browser, thus I know that I have nginx and php-fpm ...
1 vote
0 answers
3k 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 ...
0 votes
0 answers
767 views
change fastcgi directory in nginx configuration
i am not sure how to write the proper title i have 5 ajax requests that gonna execute postgresql query in php here is the directory /var/www/webgis.com: 1. webgis.html 2. php(directory) -query1....
1 vote
1 answer
1k views
web page shows me timeout gateway error FastCGI
I proceed to explain the problem and scenario a bit complex for my limited knowledge. initially I thought it was some problem associated with the performance of my scripts and queries, so I created ...
0 votes
0 answers
1k views
Debugging "upstream prematurely closed FastCGI request while reading upstream"
I am running an nginx + php-fpm setup. I recently ran into problem returning binary data to the Nginx server. Nginx show this in the error log: 2021/08/04 19:22:27 [error] 996463#996463: *1 upstream ...
0 votes
0 answers
412 views
nginx and fcgiwrap - one response per IP?
I found this comment: There is one "feature" to watch out for in a nginx + fastcgi setup. A given PHP script will only run once for a given IP. So, if the same IP loads index.php for a ...