So I got a subdomain working. It took a little finagling.
I followed the directions at:
http://rtfm.modx.com/display/revolution20/Creating+a+Subdomain+from+a+Folder+using+Virtual+Hosts
I couldn’t find the httpd.conf file, so I just went to my cPanel and created a subdomain there (which seemed to do the same thing). The only other thing I had to do was change the config.core.php file in the subdomain.
I changed:
define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');
To this:
define('MODX_CORE_PATH', '/home/USERNAME/public_html/core/');
The reason I had to do that is because my dirname(__FILE__) seemed to go to /home/URL/public_html, but rather needed to go to /home/USERNAME/public_html. It may be a HostGator thing. But it works now.
If this creates some sort of security breach let me know, but I’m glad to get it working.
By the way, Modx team, amazing.
I did have one thought though. Do the index.php and config.core.php files every get modified/overwritten in updates? If so, I’ll have to make sure to change those for everytime I update. Would it be better to have these just include a file with a line of code in the included file that says something like $context = ’subdomain1’; for the index.php file (do something similar for the config.core.php file) and that would never be overwritten on updates? I don’t know, I never went to school for this stuff anyway.