apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-conf
data:
  nginx.conf: |
    server {
            listen 80 default_server;
            location / {
                # $http_host is the host name that users seen on the browser URL
                # and it equals to `HTTP_HOST` request header.
                proxy_set_header Host $http_host;

                proxy_pass http://wordpress-service;

                # Modify `Location` of 301 or 302 HTTP response, so
                # that the browser will follow the correct location.
                # proxy_redirect ~^http://[^/]*/(.*) http://$http_host/$1;
            }
            access_log /var/log/nginx/access.log main;
            error_log /var/log/nginx/error.log warn;
        }