{"action":"created","issue":{"url":"https://api.github.com/repos/bitnami/bitnami-docker-php-fpm/issues/102","repository_url":"https://api.github.com/repos/bitnami/bitnami-docker-php-fpm","labels_url":"https://api.github.com/repos/bitnami/bitnami-docker-php-fpm/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/bitnami/bitnami-docker-php-fpm/issues/102/comments","events_url":"https://api.github.com/repos/bitnami/bitnami-docker-php-fpm/issues/102/events","html_url":"https://github.com/bitnami/bitnami-docker-php-fpm/issues/102","id":300688030,"number":102,"title":"php not being displayed when using bitnami nginx and php-fpm containers","user":{"login":"HeadBanging","id":20856850,"avatar_url":"https://avatars3.githubusercontent.com/u/20856850?v=4","gravatar_id":"","url":"https://api.github.com/users/HeadBanging","html_url":"https://github.com/HeadBanging","followers_url":"https://api.github.com/users/HeadBanging/followers","following_url":"https://api.github.com/users/HeadBanging/following{/other_user}","gists_url":"https://api.github.com/users/HeadBanging/gists{/gist_id}","starred_url":"https://api.github.com/users/HeadBanging/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HeadBanging/subscriptions","organizations_url":"https://api.github.com/users/HeadBanging/orgs","repos_url":"https://api.github.com/users/HeadBanging/repos","events_url":"https://api.github.com/users/HeadBanging/events{/privacy}","received_events_url":"https://api.github.com/users/HeadBanging/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-02-27T15:56:54Z","updated_at":"2018-03-08T15:16:07Z","closed_at":null,"author_association":"NONE","body":"**Description**\r\n\r\nUnable to get bitnami nginx container (bitnami/nginx:latest) to work with bitnami php-fpm container (bitnami/php-fpm:latest).  HTML pages load correctly - PHP doesn't load, resulting in a plain (not 404) 'file not found' and error in logs 'FastCGI send in stderr \"Primary Script Unknown\" while reading response header from upstream' \r\n\r\n**Steps to reproduce the issue:**\r\n\r\n1. Create yml file for docker compose containing the following:\r\n```\r\nversion: '2'\r\n\r\nnetworks:\r\n  app-tier:\r\n    driver: bridge\r\n\r\nservices:\r\n  nginx:\r\n    image: 'bitnami/nginx:latest'\r\n    depends_on:\r\n        - phpfpm\r\n    networks:\r\n        - app-tier\r\n    ports:\r\n      - '80:8080'\r\n      - '443:8443'\r\n    volumes:\r\n      - ./nginx/nginx.conf:/bitnami/nginx/conf/nginx.conf\r\n      - ./nginx/fastcgi.conf:/bitnami/nginx/conf/fastcgi.conf\r\n      - ./logs:/opt/bitnami/nginx/logs\r\n      - ./nginx/vhosts:/bitnami/nginx/conf/vhosts\r\n      - ./public:/opt/bitnami/nginx/html\r\n  phpfpm:\r\n    image: 'bitnami/php-fpm:latest'\r\n    networks:\r\n      - app-tier\r\n    volumes:\r\n      - ./public:/app\r\n      - ./logs/php:/opt/bitnami/php/log\r\n      - ./php/php.ini:/opt/bitnami/php/etc/php.ini\r\n      - ./php/www.conf:/opt/bitnami/php/etc/php-fpm.d/www.conf\r\n    working_dir: /app\r\n```\r\n2. Create directories as described above (.logs, .nginx, etc)\r\n3. Copy default config files from container into local location to provide base point to edit from\r\n4. Create simple index.html file and simple info.php file\r\n5. Create vhost file for website\r\n```\r\nserver {\r\n        listen 0.0.0.0:8080;\r\n        server_name  www.my_website_example.com;\r\n        server_tokens off;\r\n \r\n        error_log \"/opt/bitnami/nginx/logs/my_website_example-error.log\";\r\n        access_log  \"/opt/bitnami/nginx/logs/my_website_example-access.log\";\r\n        root   /opt/bitnami/nginx/html/my_website_example/htdocs; \r\n\r\n        location / {\r\n                try_files $uri $uri/index.php;\r\n        }\r\n\r\n        location ~ \\.php$ {\r\n         # fastcgi_pass [PHP_FPM_LINK_NAME]:9000;\r\n                fastcgi_pass phpfpm:9000;\r\n                fastcgi_index index.php;\r\n                include fastcgi.conf;\r\n         }\r\n \r\n        location ~* \\.(js|css|png|jpg|jpeg|gif|ico)$ {\r\n                expires max;\r\n                log_not_found off;\r\n        }\r\n}\r\n```\r\n6. Start containers\r\ndocker-compose up --remove-orphans -d\r\n\r\n**Describe the results you received:**\r\n\r\nDocker Compose returns no errors.\r\nVisiting html page at website returns no errors and displays correctly.\r\nVisiting php page at website results in a plain (not 404) 'file not found' and error in logs 'FastCGI send in stderr \"Primary Script Unknown\" while reading response header from upstream'\r\nThis suggests to me that the php page is seen and loaded by nginx (hence not a 404) but the php-fpm cannot be connected to to display the php content.\r\n\r\n**Describe the results you expected:**\r\n\r\nI expected phpinfo to be displayed.\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\nThis is reproducible every time.  Right now this is a simple config, built using bitnami instructions - I want to get php-fpm working before I try adding in the bitnami mariadb container.\r\n\r\n**Version**\r\n\r\n- Output of `docker version`:\r\n\r\n```\r\nClient:\r\n Version:      1.13.1\r\n API version:  1.26\r\n Go version:   go1.6.2\r\n Git commit:   092cba3\r\n Built:        Thu Nov  2 20:40:23 2017\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.13.1\r\n API version:  1.26 (minimum version 1.12)\r\n Go version:   go1.6.2\r\n Git commit:   092cba3\r\n Built:        Thu Nov  2 20:40:23 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: false\r\n```\r\n\r\n- Output of `docker info`:\r\n\r\n```\r\nContainers: 22\r\n Running: 0\r\n Paused: 0\r\n Stopped: 22\r\nImages: 19\r\nServer Version: 1.13.1\r\nStorage Driver: overlay2\r\n Backing Filesystem: extfs\r\n Supports d_type: true\r\n Native Overlay Diff: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins: \r\n Volume: local\r\n Network: bridge host macvlan null overlay\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version:  (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)\r\nrunc version: N/A (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)\r\ninit version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)\r\nSecurity Options:\r\n apparmor\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.4.0-109-generic\r\nOperating System: Ubuntu 16.04.3 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 990.8 MiB\r\nName: Aitherios\r\nID: TVRZ:OIN2:PHUQ:OZOC:XA7D:CMJM:POLM:YN36:3J6G:TQLN:6R3O:HB3W\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n```\r\n\r\n- Output of `docker-compose version` (if applicable):\r\n\r\n```\r\ndocker-compose version 1.18.0, build 8dd22a9\r\ndocker-py version: 2.7.0\r\nCPython version: 2.7.12\r\nOpenSSL version: OpenSSL 1.0.2g  1 Mar 2016\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, Docker for MAC, physical, etc.):**\r\n"},"comment":{"url":"https://api.github.com/repos/bitnami/bitnami-docker-php-fpm/issues/comments/371517428","html_url":"https://github.com/bitnami/bitnami-docker-php-fpm/issues/102#issuecomment-371517428","issue_url":"https://api.github.com/repos/bitnami/bitnami-docker-php-fpm/issues/102","id":371517428,"user":{"login":"HeadBanging","id":20856850,"avatar_url":"https://avatars3.githubusercontent.com/u/20856850?v=4","gravatar_id":"","url":"https://api.github.com/users/HeadBanging","html_url":"https://github.com/HeadBanging","followers_url":"https://api.github.com/users/HeadBanging/followers","following_url":"https://api.github.com/users/HeadBanging/following{/other_user}","gists_url":"https://api.github.com/users/HeadBanging/gists{/gist_id}","starred_url":"https://api.github.com/users/HeadBanging/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HeadBanging/subscriptions","organizations_url":"https://api.github.com/users/HeadBanging/orgs","repos_url":"https://api.github.com/users/HeadBanging/repos","events_url":"https://api.github.com/users/HeadBanging/events{/privacy}","received_events_url":"https://api.github.com/users/HeadBanging/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T15:16:07Z","updated_at":"2018-03-08T15:16:07Z","author_association":"NONE","body":"Okay - all sorted.  Thank you very much for your help."}}
{"actor":{"display_login":"HeadBanging"}}