Vhosts only one works


#1

Ok before I start chasing a flea with a sledge hammer I figured I would post. I found some similar posts but nothing conclusive that would clear up my matter at hand.
First this is what I did: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-debian-8
Everthing was semi awesome but I needed more so I did this
https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-debian-8
But then I noticed typing in the test.com no longer to test.com but example.com
Example.com seems to be ok
I did opt to only allow HTTPS:// but everytime I type test.com I go to example.com
I have even opened :443 with :80 still being currently open.
I tried the test.com.conf file and set the port at 443. Nope wron answer. So befor I fubar anything I am reaching out for some assistance.
Debian Jessie, apache2, Asus990FX AMD8350 32 gigs of Ram 1833. No over clock at all. Host OS also Debian Jessie on virtual box set to bridge mode.


#2

This is what I did and it works. Not 100% sure why it works but it does and I have a hunch.

cd /etc/apache2/sites-available

ls -al | cat | less | more

gedit test.com-le-ssl.conf (I use gedit instad of vim or nano)

ServerAdmin webmaster@localhost
ServerName test.com
ServerAlias www.test.com
DocumentRoot /var/www/test.com/public_html
DocumentRoot /var/www/test.com/public_html

###second instance of DocumentRoot was removed and file was saved ###

service apache2 reload

So not completely certain but, I may have only needed to reload apache2. as there are still 2 instances of the DocumentRoot in the example.com-le-ssl.conf file.

If this makes you happy then type sl in the cli.


closed #3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.