I want to keep the domains main page open for something else, and keep Ghost or WordPress on /blog. How do I do that?
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!
You can open subdirectory under your html root and place WordPress/Ghost there.
By default, html root is located under /var/www/html.
When you want to serve it from root page, you would install WP/Ghost in that directory /var/www/html.
But if you want to serve it from /blog, like in your case, you would just create blog folder in /var/www/html. So you will install WP/Ghost in /var/www/html/blog.
In case in WordPress, after installation verify WordPress & Site addresses, by going to WP-Admin -> Settings -> General. Make sure both are http://www.example.com/blog.
How to install WordPress on LAMP stack.
How to install WordPress on LEMP stack.
Note: In case of LAMP stack you’re using Apache, while in case of LEMP you are using nginx (engine x)
There is second possibility too. You can use subdomain, e.g. blog.example.com.
You can saw it very frequently and it is easy to setup.
You will create new Virtual Host (or Server Block in case for nginx) and make it point to another folder, e.g.: /var/www/blog.example.com/html, and you would place there WP/Ghost.
Learn more about it from tutorials:
How to set up Apache Virtual Hosts.
How to set up Nginx Server Blocks.
How to set up subdomain.
Note: You will use blog.example.com instead of test.com
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.