upstream php { server unix:/tmp/php-cgi.socket; server php:9000; } server { listen 80; server_name wordpress-docker.test; root /var/www/html; index index.php; location / { try_files $uri /index.php; } location ~ \.php$ { include fastcgi.conf; fastcgi_intercept_errors on; fastcgi_pass php; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } }