[GH-ISSUE #3850] How can I add a nginx domain host configuration? #2530

Open
opened 2026-02-26 07:35:55 +03:00 by kerem · 5 comments
Owner

Originally created by @abmmhasan on GitHub (Jul 3, 2024).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3850

I wanna add a domain that is hosted in PHP-FPM docker. My configuration (a simple example):

server {
    listen 80 default_server;

    index index.php index.html;
    server_name site1.local;
    # server_name _;
    error_log  /var/log/nginx/error.log;
    access_log /var/log/nginx/access.log;

    root /application/site1;
    client_max_body_size 12M;

    location / {
        index index.php index.html index.htm;
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass php:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }
}

I'm not getting how to add this!!! FYI, In fastcgi_pass php:9000;, php is container identity as you already know.

Originally created by @abmmhasan on GitHub (Jul 3, 2024). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3850 I wanna add a domain that is hosted in PHP-FPM docker. My configuration (a simple example): ```conf server { listen 80 default_server; index index.php index.html; server_name site1.local; # server_name _; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log; root /application/site1; client_max_body_size 12M; location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } } ``` I'm not getting how to add this!!! FYI, In `fastcgi_pass php:9000;`, php is container identity as you already know.
Author
Owner

@robogeek commented on GitHub (Feb 7, 2025):

I want to convert my Nextcloud install to use FPM. The instructions there say to integrate with the FPM support in NGINX. Which, of course, means to do something like the above. I'd hoped there would be a button in the N.P.M. config, but there isn't.

There is the advanced configuration screen that lets us paste some nginx commands in.

For the case of NextCloud, it appears my NextCloud deployment could be an NGINX container that I configure for FPM, then that is proxied in N.P.M. in the normal way. But that means going through two NGINX's to get to the service which is excess overhead.

<!-- gh-comment-id:2642484312 --> @robogeek commented on GitHub (Feb 7, 2025): I want to convert my Nextcloud install to use FPM. The instructions there say to integrate with the FPM support in NGINX. Which, of course, means to do something like the above. I'd hoped there would be a button in the N.P.M. config, but there isn't. There is the advanced configuration screen that lets us paste some nginx commands in. For the case of NextCloud, it appears my NextCloud deployment could be an NGINX container that I configure for FPM, then that is proxied in N.P.M. in the normal way. But that means going through two NGINX's to get to the service which is excess overhead.
Author
Owner

@zeknoss commented on GitHub (Jun 24, 2025):

Did you find a solution to this?

<!-- gh-comment-id:3000257255 --> @zeknoss commented on GitHub (Jun 24, 2025): Did you find a solution to this?
Author
Owner

@robogeek commented on GitHub (Jun 24, 2025):

Did you find a solution to this?

My solution was to start using Caddy. The defaults in Caddy are excellent.

<!-- gh-comment-id:3000700010 --> @robogeek commented on GitHub (Jun 24, 2025): > Did you find a solution to this? My solution was to start using Caddy. The defaults in Caddy are excellent.
Author
Owner

@zeknoss commented on GitHub (Jun 24, 2025):

Did you find a solution to this?

My solution was to start using Caddy. The defaults in Caddy are excellent.

I guess I will go that route as well... I really liked how simple and easy to use NPM but this feature is a must have.

Thank you!

<!-- gh-comment-id:3001892716 --> @zeknoss commented on GitHub (Jun 24, 2025): > > Did you find a solution to this? > > My solution was to start using Caddy. The defaults in Caddy are excellent. I guess I will go that route as well... I really liked how simple and easy to use NPM but this feature is a must have. Thank you!
Author
Owner

@github-actions[bot] commented on GitHub (Jan 15, 2026):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:3752561483 --> @github-actions[bot] commented on GitHub (Jan 15, 2026): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2530
No description provided.