<p>I want to setup WordPress PHP-fpm in Kubernetes, so I already setup that but there is some problem that currently I am facing with Nginx proxy, so when I am trying to install the woo-commerce plugin then it gives the error of</p>
<p>Installation failed: 504 Gateway Time-out 504 Gateway Time-out nginx padding to disable MSIE and Chrome friendly error page -&gt; &lt; ! - padding to disable MSIE and Chrome friendly error page -&gt;</p>
<p>I don't know what's going wrong on proxy I already set the max value for proxy_read_timeout 100. but then also it will not work. I tried so many proxy time-out values but it didn't work, so here is my Nginx proxy config <br>
<br>
wordpress.conf</p>
<pre><code>server {
    listen 80;
    server_name localhost;
 
    root /var/www/html;
    index index.php;
 
    #access_log /var/log/nginx/hakase-access.log;
    #error_log /var/log/nginx/hakase-error.log;
 
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
 
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass wordpress:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_cache phpcache;
        fastcgi_cache_valid 200 301 302 60m;
        fastcgi_cache_min_uses 1;
        fastcgi_cache_lock on;
        add_header X-FastCGI-Cache $upstream_cache_status;
        fastcgi_cache_use_stale error timeout updating invalid_header http_500 http_503;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }
}
</code></pre>
<p>nginx.conf</p>
<pre><code>user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '
                      '$status $body_bytes_sent &quot;$http_referer&quot; '
                      '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';

    access_log  /var/log/nginx/access.log  main;
    fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=phpcache:100m max_size=10g inactive=60m use_temp_path=off;
    fastcgi_cache_key &quot;$scheme$request_method$host$request_uri&quot;;
    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}
</code></pre>

<p>The one working for me</p>
<pre><code>location ~ \.php$ {
    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
    fastcgi_connect_timeout 300s;
    fastcgi_send_timeout 60;
    fastcgi_read_timeout 60;
}
</code></pre>
<p>You must be running the two containers inside the single pod you can debug the logs of ingress and nginx of WordPress to check more details.</p>
<p>you can use this github as reference : <a href="https://github.com/harsh4870/Kubernetes-wordpress-php-fpm-nginx" rel="nofollow noreferrer">https://github.com/harsh4870/Kubernetes-wordpress-php-fpm-nginx</a></p>
<p>Also, check the blog to understand more :  <a href="https://medium.com/@harsh.manvar111/kubernetes-wordpress-php-fpm-nginx-73cb4f9aef02" rel="nofollow noreferrer">https://medium.com/@harsh.manvar111/kubernetes-wordpress-php-fpm-nginx-73cb4f9aef02</a></p>
