All Questions
1,326
questions
0
votes
1
answer
36
views
php-fpm creats only one socket file
I have multiple virtual hosts with unique domain names, users, and root directories for each on Nginx and php8.1-fpm.
In the /etc/php/8.1/fpm/pool.d/domain.com.conf contains
user = domainuser
group = ...
0
votes
2
answers
111
views
Why cannot Nginx access files in the `wp-includes` directory?
I have a WordPress website that I installed on an Ubuntu server. I setup Nginx to listen for requests and to push them to php-fpm. I am using the pool feature so that the WordPress site can have all ...
0
votes
0
answers
68
views
PHP-FPM triggers "pm.max_children" but does never recover
I have a scenario where I use some JQuery (yes a very old project) that does 10~100 HTTP GET requests async. I just fire them and let the browser handle how many are being done in parallel. I don't ...
0
votes
1
answer
130
views
502 Bad Gateway nginx 1.20.1
I know why is this coming.
But I don't know how to fix it.
I was installing osticket following this article.
https://www.vultr.com/docs/how-to-install-osticket-on-centos-7/
Turns out current osticket ...
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 ...
0
votes
1
answer
118
views
Running PHP7.4 FPM on Ubuntu. Forgot to install PHP7.2-curl. Wondering if I will need to bring down all the other websites for the change
So I run a server with about 7 websites.
Just wondering if adding a module I will have to bring down the php-fpm and thus reboot the nginx process or adding a module.
Nginx Ubuntu 20.04 php 7.4 ...
0
votes
0
answers
48
views
system load spikes causing php-fpm pools to fill and cause micro outages
kind of at my wits end at this point and looking for some help.
2 physical Web servers
CentOS
NGINX
PHP5
php-fpm
2 physical DB Servers
CentOS
NGINX
elastic search
zookeeper
couchbase
as user load ...
0
votes
2
answers
122
views
Incorrect Permissions and Ownership in /etc/nginx/sites-available Folder for Containers
I seem to have encountered an issue with the default permissions and ownership of the containers within my /etc/nginx/sites-available directory. The current permissions and ownership structure appears ...
0
votes
1
answer
231
views
Laravel, nginx, Docker, PHP - Load Test, Very Unsatisfactory Results
We are creating two servers in Hetzner (https://www.hetzner.com/cloud).
Parmeters of both:
CPX51 - vCPU 16 AMD, RAM 32 GB.
On one server with Ubuntu 22.04 we install Docker and run the PHP application ...
0
votes
0
answers
151
views
Nginx + php-fpm 8.1 - 502 Bad Gateway - Site down for hours until php-fpm manually restarted
I have a web server set up on Nginx and PHP-FPM (PHP version 8.1). It has worked fine for over a year now. Lately, I've noticed that the site would be down for hours - maybe once or twice a week. ...
0
votes
1
answer
550
views
Nginx and PHP-FPM 504 gateway timeout with multiple curl requests
So I've been going crazy with this for the last 5 hours or something like that.
We have been having a problem in one of our servers that suddenly started giving 504 gateway timeouts.
So first versions:...
0
votes
0
answers
413
views
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes)
I have exported a WordPress XML file which contain all pages, posts, WooCommerce products, orders etc. File size is 100MB. Now I am trying to import it on another machine but getting error. It even ...
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 ...
0
votes
0
answers
89
views
How to keep Entity Tags (Etags) generated by PHP
I'm running a small RESTfull api server from a hosted Plesk Obsidian server. A small PHP based REST Api generates ETags for resources and are correct on our development environment. In production we ...
0
votes
1
answer
47
views
nginx how to handle POST requests in 404 handler?
in my /etc/nginx/sites-enabled/devdb.easy-ads.com I have:
server {
root /srv/http/devdb.easy-ads.com/www;
index index.html index.htm index.nginx-debian.html index.php;
...
0
votes
1
answer
44
views
nginx how to execute php scripts on "internal" uris?
I have a problem getting php scripts to execute in internal sites loaded via X-accl-Redirect.. My /etc/nginx/sites-enabled/devdb.easy-ads.com file contains:
server {
root /srv/http/devdb.easy-...
-1
votes
2
answers
513
views
nginx and php-fpm waiting for server too long
I am using docker to mount nginx and a PHP-FPM using Phalcon Framework and React as the front end
`upstream fastcgi_backend {
server bfy-%APP_VERSION_UID%_buildify-php-fpm_1:90%FPM_PORT_PREFIX%;
}
...
0
votes
1
answer
232
views
Frequent server downtime and suspicious server hits to access random Pdf files
Our Server hosting PHP web application is facing frequent downtime
Server Information [Nginx, FreeBSD] Web application [PHP 5.6, MYsql 5.7]
I have gone through the Nginx logs and below are my findings
...
0
votes
0
answers
214
views
NGINX + PHP + ASDF: asdf plugin is using PHP 5.6 instead of 7.4
Goal: I need to load a PHP website (7.4) running NGINX using ASDF plugin.
(Mac OS, M2 processor, NGINX and ASDF installed)
issue:
when I load the website via nginx I get this:
Fatal error: Composer ...
0
votes
0
answers
44
views
PHP 7.4 FPM under Nginx serves wrong class from cache
We have a Linux environment serving a few different applications, all written in PHP 7.4. They are served out of a single Nginx web server using virtual hosts, and are all using FPM.
In our code we ...
-2
votes
1
answer
212
views
Site downloading instead of displaying in broswer
The site is this agency website.
I just migrated a wordpress site files and database (diffrent url) to digitalocean (new url).
nginx installed settings ok.
php-fpm8.1
letsencrypt installed,
mariadb ...
1
vote
1
answer
251
views
PHP-FPM static max_children amount doesn't seem to matter much during stress tests
I've been stress testing PHP-FPM set up as static using wrk, with NGINX running on Ubuntu Server 22.04 for the past few days, writing down results for every scenario. When I look at them, it seems to ...
1
vote
1
answer
180
views
Handling Nginx location aliases when using a standalone PHP-FPM server
I host various Laravel applications that use various versions of PHP, and decided to improve the current single bloated container Docker setup by having multiple PHP-FPM containers, one for each PHP ...
1
vote
1
answer
244
views
Rate limit specific PHP endpoints when running Nginx with php-fpm
Like many apps, I have some endpoints that are more sensitive than others, such as login & password reset, and need rate limiting. However, nginx handles all requests for PHP resources through a ...
0
votes
2
answers
206
views
Limit CPU Usage per PHP Pool
I'm running a typical LEMP stack where I have multiple PHP-FPM pools, one for each site that's on a Rocky Linux 8 VPS. Occasionally, some rogue process on one of the sites will cause a huge CPU spike ...
0
votes
1
answer
92
views
Nginx/PHP-FPM Server often 521 error
I have problem with my server since its ended up with 520/521 error. However, this only happen in a few seconds then its normal again. I have no idea where the problem is.
The SSH is running well, ...
0
votes
0
answers
61
views
php files serving blank pages except for the login page on nginx
I have a project that has the root directory ed_v001 and all the includes and settings are in a directory ed_v001/includes.
When i open it in a browser it displays the login page properly but when you ...
1
vote
1
answer
1k
views
How to downgrade php-fpm from php-fpm8.1 to php-fpm7.4 in Ubuntu 22.04?
I installed php-fpm8.1 with nginx in Ubuntu 22.04, but php-fpm8.1 is incompatible with some old code; I want to downgrade to php-fpm7.4 without damaging anything. How can I do that?
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;
...
0
votes
0
answers
768
views
AWS ECS: Networking between container Nginx and PHP-FPM on the same host
So I have spent the past two weeks learning about ECS and trying to setup a very basic task with an nginx container and and a PHP app in another container. It seems like I'm very close, but I'm now ...
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 ...
1
vote
1
answer
2k
views
Nginx returning 404 on new installation
On Linux Mint 20.3 I had working setup for my local development of website:
server {
listen 80;
listen [::]:80;
server_name cbp.local;
root /home/gacek/html/cbp/public;
index ...
1
vote
0
answers
576
views
What does "connect() failed (101: Network is unreachable) while resolving" in NGINX error log mean?
Earlier this week, we host a live virtual event on our organization's website that had higher-than-expected attendance. We had several complaints from users saying they either couldn't get into the ...
1
vote
0
answers
192
views
need nginx to be able to check directory outside of root directory
I have a Laravel app that works perfectly fine when running with php artisan serve but when trying to use nginx as the frontend I'm having all sorts of trouble getting this to work properly.
I ...
1
vote
0
answers
147
views
Nginx - Server dead when received many requests
we have a large Woocommerce website hosted on Google VM servers (E2 4vCPU + 32 GB RAM + 100 GB SSD Storage), recently we created a mobile application using flutter and WordPress -Woocommerce- API, but ...
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 ...
0
votes
0
answers
453
views
How can I fix docker networking issues with multiple containers when working locally
So I have a basic docker setup with nginx and php-fpm that gets deployed to AWS ECS:
Dockerfile for nginx
# Install nginx
FROM --platform=linux/amd64 nginx:latest
# Use custom configs
ADD nginx/conf/...
0
votes
0
answers
2k
views
nginx (+ php-fpm) sometimes returns http code = 499
I have a script.php that is called via curl and runs for about 40 minutes.
Sometimes the script just stops in the middle.
In nginx access.log script call completes with strange http code 499.
There ...
0
votes
1
answer
730
views
PHP-FPM ondemand: active children amount up till max_children, then php stops working
My server runs 10 websites, very low traffic. Config:
Ubuntu 20.04.5 LTS
Nginx 1.18.0 (Ubuntu)
PHP 7.4.3
In nginx.conf this is added:
upstream local_php {
server unix:/run/...
0
votes
0
answers
378
views
FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
Need help with fnd the issue on new server. Im running magento site with nginx php-fpm with varnish. The site get blank with only that text File not found.
And im getting error in nginx log
2022/12/17 ...
0
votes
0
answers
244
views
Nginx Server Down - Resource temporarily unavailable & upstream response is buffered to a temporary file
I have a live Ubuntu 22.04 server serving websites, that are mostly static but using PHP (Laravel) to display pages (there are some dynamic elements).
I'm using Php8.1-fpm and Nginx to serve the pages....
0
votes
1
answer
777
views
Unable to get index.php from Nginx container to PHP container on AWS and Docker
I've installed Docker on an AWS EC2 instance and deployed Nginx and PHP-FPM containers.
[ec2-user@ip-172-31-80-56 ~]$ sudo docker container ls
CONTAINER ID IMAGE COMMAND ...
0
votes
0
answers
172
views
PHP NGINX not working on a Subdomain
I have a Sub Domain"
ad.example.com and I am trying to install a CMS and it get stuck at install.php with a 404 not Found error
server {
access_log /var/log/nginx/ad.example.com.access.log;
...
0
votes
1
answer
324
views
Error 502, phpinfo() directing to 7.4 when 8.1 is installed (File not found)
I'm setting up a web server. I have a freshly installed Ubuntu 22.04, Nginx (welcome page works), and php-fpm which installed php8.1 and php-fpm8.1.
To test PHP, I created a /var/www//info.php which ...
0
votes
0
answers
232
views
Nginx - PHP never render. Html files work well
when I enter PHP files, they load forever. But do not show up in the browser. After few minutes the browser goes to timeout.
Html files get shown/rendered correctly.
Here is my virtualhost:
server {
...
1
vote
0
answers
536
views
executed php-fpm files get CPU to 100% usage
Im running a e-commerce/LMS wordpress site with a 2 Core cpu ,4G Ram and 4Gswap ,100G disk space server with CentOS web admin panel.
today after getting serveral http 502 report from clients suddeny ...
0
votes
2
answers
1k
views
Multiple php-fpm pools and nginx
I have a website which is built on Codeigniter 3. It is a typical nginx + php-fpm setup. Now I need to direct some of the requests to be handled by another php-fpm pool. Here is a simplified example ...
1
vote
2
answers
658
views
Nginx Server with multiple applications on sub-directories
My team has a server we use for internal tools and tests. It has a subdomain pointing to it: myserver.mycompany.com. What we're trying to achieve is to have multiple applications, each with under a ...
0
votes
0
answers
99
views
php and apache not seeing anything in there defined tmp dirs
How to check logs for non application 500s?
we have standard php and apache but not seeing anything in there defined tmp dirs
I have actually 2 issues one is routing logs for https://www.test.com
...
1
vote
1
answer
3k
views
CentOS 7 - upgrade PHP version from 7.2 to 8
CentOS 7
Nginx
Current websites run on PHP 7.2
PHP -v says
```# php -v
PHP 8.0.25 (cli) (built: Oct 25 2022 09:42:31) ( NTS gcc x86_64 )
Copyright (c) The PHP Group```
But phpinfo() in the nginx ...