I have a reverse proxy set up on nginx, which is working fine to redirect traffic to one html website internally.

I decided to look into hosting my own Wordpress server for my blog. I have a VM server up and running with Wordpress installed and serving my content, but can't seem to find the required configuration for my nginx reverse proxy to redirect this traffic

I've got this so far...

server {
    listen 80;
    server_name blog.example.com;

    location / {
        proxy_pass; # Wordpress server IP address
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

I've got this to work initially using the following edits to the Wordpress config:


...however is there a way to do this on the nginx reverse proxy instead?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.