[GH-ISSUE #253] Cannot enable PHP in a site #7254

Closed
opened 2026-03-12 19:49:21 +03:00 by kerem · 2 comments
Owner

Originally created by @nikkilocke on GitHub (Jan 11, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/253

Describe the bug
I tried to enable PHP in a site, by adding the php template, but I get the error:
open() "/etc/nginx/fastcgi.conf" failed (2: No such file or directory) when saving the site

To Reproduce
Create a docker image with the following docker-compose:

version: '2.0'
services:
  nginx:
    image: uozi/nginx-ui
    restart: always
    environment:
      - TZ=Europe/London
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./nginx:/etc/nginx
      - ./nginx-ui:/etc/nginx-ui
      - ./www:/var/www

Setup a site with an index.php file in the root, include the php template.
Expected behavior
The site can be saved.

Info (please complete the following information):

  • Server OS: Ubuntu 22.04.1
  • Server Arch: x86_64
  • Nginx UI Version: How do I tell?
  • Your Browser: Chrome

Additional context
I assume that there needs to be a fast-cgi container running, but there is no point in having the PHP template if such a container is not included in the suggested docker-compose file.

Originally created by @nikkilocke on GitHub (Jan 11, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/253 **Describe the bug** I tried to enable PHP in a site, by adding the php template, but I get the error: `open() "/etc/nginx/fastcgi.conf" failed (2: No such file or directory)` when saving the site **To Reproduce** Create a docker image with the following docker-compose: ``` version: '2.0' services: nginx: image: uozi/nginx-ui restart: always environment: - TZ=Europe/London ports: - 80:80 - 443:443 volumes: - ./nginx:/etc/nginx - ./nginx-ui:/etc/nginx-ui - ./www:/var/www ``` Setup a site with an `index.php` file in the root, include the php template. **Expected behavior** The site can be saved. **Info (please complete the following information):** - Server OS: Ubuntu 22.04.1 - Server Arch: x86_64 - Nginx UI Version: How do I tell? - Your Browser: Chrome **Additional context** I assume that there needs to be a fast-cgi container running, but there is no point in having the PHP template if such a container is not included in the suggested docker-compose file.
kerem 2026-03-12 19:49:21 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@0xJacky commented on GitHub (Jan 12, 2024):

PHP is not included in Nginx UI docker image, you have to install it manually.

<!-- gh-comment-id:1888240287 --> @0xJacky commented on GitHub (Jan 12, 2024): PHP is not included in Nginx UI docker image, you have to install it manually.
Author
Owner

@DjSni commented on GitHub (Jan 28, 2024):

You can easily do this by using a second container with php-fpm and mounting the index.php in both containers. In the site-config you only have to create the connection to the docker-container from php-fpm. It is important that both containers are in the same docker-compose file.

<!-- gh-comment-id:1913486703 --> @DjSni commented on GitHub (Jan 28, 2024): You can easily do this by using a second container with php-fpm and mounting the index.php in both containers. In the site-config you only have to create the connection to the docker-container from php-fpm. It is important that both containers are in the same docker-compose file.
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-ui#7254
No description provided.