Subdomain point to a different server

December 4, 2016 2.2k views
Apache Ubuntu 16.04


I’ve just setup my main WP site and I am trying to setup a subdomain that points to a completely different droplet with its own IP address.

I have the DNS configured already to point to the new IP and its working. My problem is my virtual host default config file is messing me up and I’m not sure how to edit it.

Right now it routes all traffic to the main url to ensure it is https:

This is what I have now.
My subdomain I want is

what am I missing?

<VirtualHost *:80>
Redirect /

<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

    <Directory /var/www/html/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    SSLEngine on


Thank you in advance!

1 Answer

Never mind - its working as intended now :)

I was able to get it to redirect to my 2nd droplet - my first snapshot I was using I could not figure out why it kept redirecting to the old server. I followed all the steps to get the wordpress to not redirect:( anyways I just used an older snapshot and now I have it all working!

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!