Hi,
Trying to serve the blog of my website with ghost blog on blog.domain.com And the website with WordPress on www.domain.com
What happens is when I access blog.domain.com, I am getting my blog and when I try to access the website with www.domain.com it redirects me to a virgin ghost …
Domain Config : A record => blog / ip A record => www / ip CNAME => @ / www
Nginx Config : For wp
server {
server_name www.domain.com;
root /var/www/mywpdirectory;
index index.php;
For Ghost
server {
listen 80;
listen [::]:80;
server_name blog.domain.com;
root /var/www/myghostdirectory/system/nginx-root;
Anyone has an idea of what could go wrong here ?
Thanks, Alex
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
Your DNS and the Nginx config look correct. I’ve had a similar issue in the past and I had to just make sure that the document root for both sites have the correct ownership so that Nginx could serve those files.
So in your case, you need to make sure that /var/www/mywpdirectory and /var/www/myghostdirectory/system/nginx-root are actually owned by the Nginx user.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.