I was trying to change the port number in both nginx.conf and docker-compose.yml to 9001 instead 9000. However, when I run docker-compose up, it shows 502 Bad Gateway. Why is that? am I locked to use port 9000 only?
nginx.conf
location /index.php {
include fastcgi_params;
fastcgi_connect_timeout 10s;
fastcgi_read_timeout 10s;
fastcgi_buffers 256 4k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass php:9000; <-- Changing this to 9001
}
docker-compose.yml
php:
build: images/php
volumes:
- ./images/php/app:/app
working_dir: /app/public
command: php-fpm
links:
- db
- cache
ports:
- "9000:9000" <-- Changing this to "9001:9001"