Currently using Apache 2 on Debian 8 with my droplet successfully. When adding a new conf in sites-available and after the reload, my call to the second virtual provides the original site after a short hesitation and white screen. The original site is using a LetsEncrypt cert but here’s the conf I think is being used for the original site (first). The second paste is the new virtual.
root@ciwise-1:/etc/apache2/sites-enabled# cat 000-default.conf <VirtualHost *:80>
ServerAdmin webmaster@localhost DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on RewriteCond %{SERVER_NAME} =ciwise.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] </VirtualHost>
And … the second in /etc/apache2/sites-enabled
root@ciwise-1:/etc/apache2/sites-enabled# cat org.conf <VirtualHost *:80> ServerAdmin david@ciwise.com ServerName ciwise.org ServerAlias www.ciwise.org DocumentRoot /var/www/org ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Can anyone help me get the second (.org) virtual working? It redirects to https://ciwise.com now.
David
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!
Accepted Answer
I created a LetsEncrypt certificate for ciwise.org and then restarted. I called https://ciwise.org and things worked. If I just entered ciwise.org the url changed to https://ciwise.com. So, I flushed my browser cache and now I can enter ciwise.org and it goes to https://ciwise.org. Everything is okay. All is good.
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.