[GH-ISSUE #752] How to use wordpress docker(5.5.3-php7.2-fpm-alpine) with nginx proxy manager #637

Closed
opened 2026-02-26 06:33:47 +03:00 by kerem · 7 comments
Owner

Originally created by @quangnv1311 on GitHub (Dec 2, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/752

I will setup a wordpress web with docker use the wordpress:php-fpm-alpine image. I already know how to configure nginx to set it up to work. But now I like the nginx proxy manager because of its features. But I don't know how wordpress fpm alpine works with nginx proxy manager. Can someone help me config nginx-proxy-manager?

Originally created by @quangnv1311 on GitHub (Dec 2, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/752 I will setup a wordpress web with docker use the wordpress:php-fpm-alpine image. I already know how to configure nginx to set it up to work. But now I like the nginx proxy manager because of its features. But I don't know how wordpress fpm alpine works with nginx proxy manager. Can someone help me config nginx-proxy-manager?
kerem 2026-02-26 06:33:47 +03:00
Author
Owner

@osnet commented on GitHub (Dec 3, 2020):

easy peasy:
wordpress docker on host X with exposed port 1234
nginx manager thes just need to point the new subdomain to X:1234
just like normal operation with manual edited configs , here only with gui frontend

<!-- gh-comment-id:738303830 --> @osnet commented on GitHub (Dec 3, 2020): easy peasy: wordpress docker on host X with exposed port 1234 nginx manager thes just need to point the new subdomain to X:1234 just like normal operation with manual edited configs , here only with gui frontend
Author
Owner

@dokbua commented on GitHub (Dec 6, 2020):

I don't know if it's that easy peasy :)

I already have a working NPM container configured and working with the default wordpress container, going to http://wpdemo1_wordpress_1:80 through an external nginx-proxy network.

This works fine, but of course has the overhead of the apache webserver, so I'm trying to get this to work with wordpress:fpm.

So what you say is, just replace the wordpress image with wordpress:fpm, and point NPM to port 9000 instead? I'm getting a 502 bad gateway with that? Any ideas?

version: '3.1'

services:

  wordpress:
#   image: wordpress
    image: wordpress:fpm
    restart: unless-stopped
#   ports:
#     - 8080:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: exampleuser
      WORDPRESS_DB_PASSWORD: examplepass
      WORDPRESS_DB_NAME: exampledb
    volumes:
      - ./wordpress:/var/www/html
    networks:
      - nginx-proxy

  db:
    image: mysql:5.7
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: exampledb
      MYSQL_USER: exampleuser
      MYSQL_PASSWORD: examplepass
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - ./db:/var/lib/mysql

volumes:
  wordpress:
  db:

networks:
  nginx-proxy:
    external:
      name: nginx-network
<!-- gh-comment-id:739441567 --> @dokbua commented on GitHub (Dec 6, 2020): I don't know if it's that easy peasy :) I already have a working NPM container configured and working with the default wordpress container, going to http://wpdemo1_wordpress_1:80 through an external nginx-proxy network. This works fine, but of course has the overhead of the apache webserver, so I'm trying to get this to work with wordpress:fpm. So what you say is, just replace the wordpress image with wordpress:fpm, and point NPM to port 9000 instead? I'm getting a 502 bad gateway with that? Any ideas? ``` version: '3.1' services: wordpress: # image: wordpress image: wordpress:fpm restart: unless-stopped # ports: # - 8080:80 environment: WORDPRESS_DB_HOST: db WORDPRESS_DB_USER: exampleuser WORDPRESS_DB_PASSWORD: examplepass WORDPRESS_DB_NAME: exampledb volumes: - ./wordpress:/var/www/html networks: - nginx-proxy db: image: mysql:5.7 restart: unless-stopped environment: MYSQL_DATABASE: exampledb MYSQL_USER: exampleuser MYSQL_PASSWORD: examplepass MYSQL_RANDOM_ROOT_PASSWORD: '1' volumes: - ./db:/var/lib/mysql volumes: wordpress: db: networks: nginx-proxy: external: name: nginx-network ```
Author
Owner

@osnet commented on GitHub (Dec 6, 2020):

aaaah
now the situation is more clear

sounds like you are willing to „abuse“ npm as webserver ??

idk if that is useful
if u dont want apache-fpm build your own wordpress image with nginx-fpm?

rcd notifications@github.com schrieb am So. 6. Dez. 2020 um 02:38:

<!-- gh-comment-id:739478769 --> @osnet commented on GitHub (Dec 6, 2020): aaaah now the situation is more clear sounds like you are willing to „abuse“ npm as webserver ?? idk if that is useful if u dont want apache-fpm build your own wordpress image with nginx-fpm? rcd <notifications@github.com> schrieb am So. 6. Dez. 2020 um 02:38:
Author
Owner

@dokbua commented on GitHub (Dec 6, 2020):

My bad, I obviously misunderstood the interactions between NPM and FPM. Thanks anyway!

<!-- gh-comment-id:739479454 --> @dokbua commented on GitHub (Dec 6, 2020): My bad, I obviously misunderstood the interactions between NPM and FPM. Thanks anyway!
Author
Owner

@igormages commented on GitHub (Mar 15, 2021):

Thats exactly what i'm trying to do. Someone has a solution ?

<!-- gh-comment-id:799713637 --> @igormages commented on GitHub (Mar 15, 2021): Thats exactly what i'm trying to do. Someone has a solution ?
Author
Owner

@chaptergy commented on GitHub (May 12, 2021):

That is not possible. For progress on this see https://github.com/jc21/nginx-proxy-manager/issues/58, though someone from the community would have to develop this and make a PR.

<!-- gh-comment-id:840107599 --> @chaptergy commented on GitHub (May 12, 2021): That is not possible. For progress on this see https://github.com/jc21/nginx-proxy-manager/issues/58, though someone from the community would have to develop this and make a PR.
Author
Owner

@geekyayush commented on GitHub (Aug 6, 2023):

Is there any way we could do this?

Sorry for commenting on this old issue, but I really need to use "fastcgi_pass" for my Wordpress site using php-fpm.
Normal Wordpress setup without php-fpm and with just PHP works fine. But when I use Wordpress php-fpm version, I get 502 error when visiting my domain.

I would really appreciate if someone could tell me a way to use "fastcgi_pass" instead of proxy_pass

<!-- gh-comment-id:1666794185 --> @geekyayush commented on GitHub (Aug 6, 2023): Is there any way we could do this? Sorry for commenting on this old issue, but I really need to use "fastcgi_pass" for my Wordpress site using php-fpm. Normal Wordpress setup without php-fpm and with just PHP works fine. But when I use Wordpress php-fpm version, I get 502 error when visiting my domain. I would really appreciate if someone could tell me a way to use "fastcgi_pass" instead of proxy_pass
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#637
No description provided.