All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
31 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, ...
jamminjames's user avatar
-1 votes
1 answer
80 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 ...
Zorono's user avatar
  • 3
2 votes
0 answers
167 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 ...
Joaquim d'Souza's user avatar
0 votes
1 answer
150 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 ...
DanRan's user avatar
  • 103
1 vote
1 answer
46 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 : ...
fred59xc06's user avatar
0 votes
0 answers
132 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 ...
DanRan's user avatar
  • 103
0 votes
1 answer
157 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 ...
user20893268's user avatar
2 votes
1 answer
507 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; ...
hanshenrik's user avatar
0 votes
1 answer
301 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 ...
Fluktegrute's user avatar
0 votes
0 answers
362 views

How to create a proper nginx fastcgi configuration for 1 server 1 domain

I would like something simple like everything to redirect to ssl and from there cached I guess no? How can I get non www version to redirect to www version as well PS. I am using ssl strict ...
Crypto Coupons's user avatar
1 vote
1 answer
236 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 ...
Crypto Coupons's user avatar
0 votes
0 answers
89 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 ...
Crypto Coupons's user avatar
1 vote
2 answers
458 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 ...
Raimond's user avatar
  • 11
0 votes
0 answers
129 views

fatal: repository not found (git + http + nginx + fastcgi)

I am trying to serve git repositories using Nginx. I have the following configuration for Nginx server: worker_processes auto; error_log /var/log/nginx/error.log notice; pid /var/run/nginx.pid; ...
enriquesb's user avatar
1 vote
0 answers
216 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 ...
J.Doe's user avatar
  • 11
0 votes
1 answer
437 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....
TheMonkeyKing's user avatar
1 vote
0 answers
70 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; ...
yvgwxgtyowvaiqndwo's user avatar
1 vote
0 answers
587 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 (!...
Genisys Mythic's user avatar
0 votes
2 answers
490 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 ...
sjiamnocna's user avatar
1 vote
1 answer
828 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 ...
Gibz's user avatar
  • 11
0 votes
1 answer
140 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 ...
cheonmu's user avatar
  • 25
0 votes
1 answer
290 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 ...
JeremyCanfield's user avatar
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 ...
Maqsud's user avatar
  • 111
0 votes
0 answers
548 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....
astaga's user avatar
  • 1
0 votes
0 answers
786 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 ...
Koala Yeung's user avatar
0 votes
0 answers
279 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 ...
user92979's user avatar
  • 101
0 votes
1 answer
2k views

Cannot disable buffering during SSE connection

I am trying to migrate from Apache2 to NGINX and having issues with SSE connections. Everything else is working fine, the regular GET or POST requests are getting through successfully. Note that the ...
Anatoly Malishevski's user avatar
0 votes
1 answer
561 views

NGINX: Ignoring fbclid parameter for FastCGI Cache Purposes

There are some good responses to this question here: NGINX: Ignoring Certain URL Parameters for Cache Purposes But I cannot seem to get it to work. I'm running a wordpress install and here is my ...
knofun's user avatar
  • 3
0 votes
1 answer
660 views

Is FastCGI OK in 2021?

It appears most discussions about FastCGI here are frozen from nearly a decade ago and so as someone who just decided to start making use of it, I'm wondering if I am making a mistake with unforeseen ...
Timothy R. Butler's user avatar
0 votes
0 answers
559 views

Using nginx $request_id for CSP nonce value: how to avoid caching it?

I'm using the nginx $request_id for the CSP nonce value, but how can I get fastcgi_cache to bypass caching it? I tried this above the location block where the variable is created, but it seems to stop ...
jamminjames's user avatar
0 votes
1 answer
187 views

NGINX FastCGI "Primary script unknown" on every other image upload POST

I have a simple upload php script that accepts image jpg files and saves them to a screenshots directory then returns the link to the client. In pre-deployment testing, I am running into the nginx ...
Fireant456's user avatar
0 votes
1 answer
72 views

Nginx fastcgi_cache and kokos-analytics wordpress plugin

I have setup nginx to cache page requests as described in this tutorial. There for looged in users the caching is disabled in this tutorial by an if request as: # Don't use the cache for cookied ...
mathse's user avatar
  • 3
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 ...
littlePigletWings's user avatar
2 votes
1 answer
757 views

Is it possible to configure nginx to just handle SSL?

I have a web server written in C++ already, but it uses TCP sockets without SSL. I want to connect it to the web, but I want to use something like nginx to handle the SSL, and also basic security ...
CaptainCodeman's user avatar
0 votes
0 answers
1k views

FastCGI allowed memory exhausted in Wordpress

I have Wordpress running on a Ubuntu 20.04 server with Nginx and PHP 7.4. When trying to generate a feed (by going to a feed URL such as /category/feed) , I receive the following error: 2020/09/11 18:...
videosurfer's user avatar
0 votes
2 answers
1k views

nginx how to passthrough frontend ip address to backend server (do not confuse passing through user ip address to backend)

I have server Front server:Apple and Back End server Orange Just to be clear in first line I don't want to pass through user ip address through Apple to Orange as I already implemented that by using ...
danone's user avatar
  • 166
0 votes
1 answer
811 views

How to Enable Immediate CGI Line Outputs With Nginx, Without Waiting for a CGI Script to Finish?

I have a perl and shell script that process a bunch of data and output results as they happen, like: 5 processed in 0.58 seconds. 10 processed in 0.79 seconds. ... 150 processed in 0.65 seconds. DONE! ...
Crash Override's user avatar
0 votes
0 answers
493 views

Nginx Location Directive - Sending Query Parameters to index.php

I'm trying to setup a location directive in nginx with an exact URI match of the form: http://host/authenticate/?username=test&password=test. I have a script called, index.php located in the ...
Malanie's user avatar
0 votes
2 answers
355 views

Nginx Location Directive - File gets downloaded

I currently have setup an Nginx location block that matches a uri if and only if it starts and ends with /auth/test.php. The only match would be http://host/auth/test.php. location ~ ^/auth/test\....
Malanie's user avatar
1 vote
1 answer
520 views

Can nginx proxy_cache replace fastcgi_cache?

If nginx is already used with proxy_cache, is there still any need to use fastcgi_cache? In other words.. When using nginx proxy_cache, there is no more need for fastcgi_cache?
adrelanos's user avatar
-1 votes
1 answer
590 views

How can I fix the error Undefined variable: _ENV in /home/nginx/domains/mydomain.com/system/Config/BaseConfig.php?

I am trying to install a Codeigniter application in pure NGINX + PHP-FPM environment but it was previously developed in apache . After adding all the proper rules to Nginx in order to work with ...
Optimus Servers's user avatar
0 votes
1 answer
259 views

nginx config causes "Primary script unknown"

I am having a really puzzling issue with my nginx config. I keep seeing this error: FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream client: 76.14.172.29, ...
kp123's user avatar
  • 101
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, ...
emmdee's user avatar
  • 2,227
0 votes
1 answer
2k views

Nginx - Redirect to remove index.php from path

I'm trying to deploy a web application for building REST services. The application is built using PHP and you BYO web server and database software. I'm using Nginx and MySQL (MariaDB). I've managed to ...
damiante's user avatar
0 votes
0 answers
283 views

Nginx FastCGI primary script unknown when using a wildcard setup

I am trying to set up a dev stack where I can simply create a new directory and have it accessible as subdomain through nginx. I am running into the infamous 'primary script unknown' issue, and I ...
Ieuan's user avatar
  • 111
1 vote
1 answer
130 views

Matching redirected nginx requests from original path

My current configuration rewrites all php pages to /index.php?$query_string, I need this to work for a specific path, but when using a location block for this, once the path has been rewritten it no ...
johnramsden's user avatar
1 vote
1 answer
957 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 ...
lyna's user avatar
  • 11
0 votes
0 answers
108 views

nginx serving php files

I am having trouble with a php test file on my nginx webserver. For some reason, everytime I am trying to reach http://localhost/test.php I get the famous error No input file specified. After ...
Omer Victor Cohen's user avatar
1 vote
1 answer
2k views

Nginx fastcgi cache in different location block

I am trying to cache different location with different cache keyzone but it is not working. Cache is only working for the root "/" location. If I turn off the cache for location "/" then still it ...
JKhan's user avatar
  • 137
0 votes
1 answer
2k views

FastCGI NGINX permission denied error

Having trouble understanding how to correctly use FastCGI processes with NGINX. Unlike Apache, NGINX does not automatically spawn FCGI processes. So I first apt-get fcgiwrap spawn-fcgi. I spawned a ...
pairwiseseq's user avatar

1
2 3 4 5
7