Hi!
So I have successfully added a DNS record for my subdomain. Now I have access to “blog.mydomainname.com”
I then created a new virtualhost for my subdomain in /etc/apache2/site-availables/000-default.conf :
<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot /var/www/blog/
ServerName blog.example.com
ErrorLog /var/log/httpd/blog/error.log
</VirtualHost>
saved it and restarted apache.
But nothing changes… when I browse blog.mydomain.com it still shows my main website. Obviously i have created a new folder (“blog”) in /var/www and uploaded wordpress via FTP.
Am I missing something?
Thank you!
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 need to create a new VirtualHost (new file)
Add
Change
sudo service apache2 restart
Here you go
I used another method but thank you for your time :) (it still doesn’t fully work though since I get a blank page)
Cheers
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.