Question
Subdomain point to a different server
Hello,
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 staging.every-tuesday.com
what am I missing?
<VirtualHost *:80>
ServerName www.every-tuesday.com
Redirect / https://www.every-tuesday.com/
</VirtualHost>
<VirtualHost *:443>
ServerName every-tuesday.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile
SSLCertificateKeyFile
SSLCACertificateFile
</VirtualHost>
Thank you in advance!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×