I have MyDomain1 and MyDomain2 as Virtual Hosts on my server. Each site has its own Virtual Host file that resides in /etc/apache2/sites-available/. For MyDomain2 it's like:
<VirtualHost *:80> ServerAdmin webmaster@MyDomain2.com ServerName MyDomain2.com ServerAlias www.MyDomain2.com DocumentRoot /var/www/MyDomain2/wordpress <Directory /var/www/MyDomain2/wordpress> Order Deny,Allow Allow from all Options None AllowOverride All </Directory>
When I was testing it before I wanted to do it on port 8080, but now I switched it back to port 80, but every time I try to hit MyDomain2 in the browser, it tries to bring up MyDomain2.com:8080. I've restarted apache and checked the ports.conf file, but I'm not sure where else to look. Meanwhile MyDomain1.com works normally on port 80.
I tried to run a test by trying to change the destination folder inside the MyDomain2 Virtual Host file to be like
DocumentRoot /var/www/MyDomain1/testFolder <Directory /var/www/MyDomain1/testFolder
When I do that, hitting MyDomain2.com in the browser will bring up the index file in MyDomain1/testFolder on port 80 correctly. So I'm not sure why port 80 doesn't work when I use MyDomain2 in the Virtual Host file.
Can someone please point me in the right direction?