2
I have my URL (example.com:8010) pointing to my server, which works and goes to the /var/www directory properly. I created another vhost file to go to the test directory but when I type the URL for that in with a subdomain it does not work (test.example.com:8010), only typing it in with a slash works (example.com:8010/test).
EDIT: Something I forgot to mention is that when I do go to test.example.com:8010 it goes to the default /var/www folder, and that typing text.example.com:8010/test obviously goes to the test folder.
Here is my vhost for the two entries:
Example.com -
<VirtualHost *:80>
ServerName example.com
ServerAdmin admin@example.com
DocumentRoot /var/www
<Directory /var/www/>
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
<VirtualHost *:8010>
ServerName example.com
ServerAdmin admin@example.com
DocumentRoot /var/www
<Directory /var/www/>
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
Test.Example.com -
<VirtualHost *:80>
ServerName test.example.com
ServerAdmin admin@example.com
DocumentRoot /var/www/test
<Directory /var/www/test/>
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
<VirtualHost *:8010>
ServerName test.example.com
ServerAdmin admin@example.com
DocumentRoot /var/www/test
<Directory /var/www/test/>
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
I should also mention that I have another vhost for that test directory set up so that on my local network i can type test.lacol and it goes to that directory, which works:
<VirtualHost *:80>
ServerName test.lacol
ServerAdmin admin@example.com
DocumentRoot /var/www/test
<Directory /var/www/test/>
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
<VirtualHost *:8010>
ServerName test.lacol
ServerAdmin admin@example.com
DocumentRoot /var/www/test
<Directory /var/www/test/>
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>
Fixed the formatting but it did not fix the issue. – CR47 – 2013-10-09T19:11:06.600