I have an existing meteor application and am using nginx as my server, lets say at example.com
I want to add a wordpress blog, which should be accessed at example.com/blog
I also preferably want my blog to exist on it's own droplet (server) but if it needs to be on the same droplet (server) then it's ok.
How do I do this?
I have been able to get it to work with a different server block with a different server_name
at blog.example.com. I also have gotten static files to be accessible under a sub directory at example.com/blog/index.html. This where everything exists on the same droplet (server).
But I can't get a wordpress application be accessible through example.com/blog.
EDIT:
What I ended up doing is creating a new server instance(droplet), configured it with LEMP stack and NGINX. It works if I try to access the IP.
Now, on my actual server, added a location block
location /blog {
rewrite ^/blog/(.*)$ /$1 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://wordpress-server-ip;
proxy_redirect off;
}
My new problem is, that my blog is not able to load the .css files in chrome because, my proxy server is configured to https and wordpress loads the files over http. You can check this out at https://juerix.com/blog.
So I went into my wp-config
file and changed the site and wordpress url https://juerix.com/blog
. Didn't help.