server { listen 80; server_name wordpress-docker.test; root /var/www/html2; index index.php index.html; location / { autoindex on; autoindex_exact_size on; try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { set $upstream php:9000; # nginx will now start if host is not reachable fastcgi_pass $upstream; fastcgi_index index.php; include fastcgi.conf; fastcgi_intercept_errors on; #fastcgi_pass php:9000; } }