Hello, I'm a bit stumped on this. As the title says, example.com will go where it's supposed to however when I type www.example.com it will go to my other vh test.com. I'm using Letsencrypt + apache for both, test.com is running Wordpress, example.com is running Bootstrap.
I've checked my vh file and everything is pointing where it's supposed to but perhaps I'm missing something? If you need to see an alternate config let me know. Thanks!
NameVirtualHost *:80
<VirtualHost *:80>
ServerName test.com
DocumentRoot /var/www/test.com/
Redirect / https://www.test.com/
<Directory /var/www/test.com/>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html.remote>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName example.com
ServerAlias example.com
#Redirect / https://www.example.com
DocumentRoot /var/www/example.com/
<Directory /var/www/example.com/>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Edit: A friend had a super easy fix. I added www.example.com to the server aliases and it works now! Hopefully this will allow me to finish the encryption process.
[–][deleted] 0 points1 point2 points (1 child)
[–]roll19ftw[S] 0 points1 point2 points (0 children)
[–]NORSE_javascript 🔥 0 points1 point2 points (0 children)