# First, create a ConfigMap whose contents are used # as the nginx.conf file in the web server. # This server uses /var/www/html as its # root document directory. When the server gets a # request for *.php, it will forward that request # to our PHP-FPM container. kind: ConfigMap apiVersion: v1 metadata: name: configmap-nginx labels: {{- include "site.labels" . | nindent 4 }} data: default.conf: | server { listen 8080 default_server; # Set nginx to serve files from the shared volume! root /var/www/html/web; index index.php; server_name _; location / { try_files $uri $uri/ =404; } location ~ \.php$ { root /var/www/html/web; try_files $uri =404; include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_param HTTP_PROXY ""; fastcgi_param SCRIPT_FILENAME $request_filename; #fastcgi_split_path_info ^(.+\.php)(/.+)$; #try_files $uri =404; #include fastcgi_params; #fastcgi_param REQUEST_METHOD $request_method; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #fastcgi_pass 127.0.0.1:9000; } }