Answers.Body: <p>This is now fixed. The dynamic path to the new templates folder was wrong:</p>
  
  <pre><code>define('CRAFT_TEMPLATES_PATH', realpath(dirname(__FILE__) . "/../templates_va").'/');
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-23T07:48:55.013Z
Answers.LastActivityDate: 2015-11-23T07:48:55.013Z
Answers.UserDisplayName: Amit Erandole
Body: <p>I want to setup a new custom subdomain (va.domain.com) within the project of my existing domain (craft.domain.com) using <code>homestead</code>.</p>
  
  <p>So I referred to this <a href="https://craftcms.stackexchange.com/questions/4717/is-it-possible-to-route-a-subdomain-to-specific-template-group">this answer on craftexchange</a> and followed all the steps.</p>
  
  <p>I now have a separate folder at the root level called <code>public_va</code>. Inside that I have my <code>index.php</code>with this define statement that is supposed to change the path:</p>
  
  <pre><code>define('CRAFT_TEMPLATES_PATH', realpath(dirname(__FILE__) . "/../templates_va").'/');
  </code></pre>
  
  <p>Inside of the <code>craft</code>folder I have created a folder called <code>templates_va</code> that is a sibling of the existing <code>templates</code> folder. And I put in a simple index.html file in just for testing.</p>
  
  <p>Now when I point my browser to <code>va.domain.com</code>, it just shows me:</p>
  
  <pre><code>Page Not Found
  
  The requested URL was not found on this server.
  </code></pre>
  
  <p>I also tried creating a new (single) section called <code>va_homepage</code> in the CP backend but I get the same error.</p>
  
  <p>What am I doing wrong? How do I fix this? My error logs inside my vagrant box show nothing. The domain itself has been setup correctly via homestead. I verified by routing request to a static file.</p>
  
Tags: <routing><subdomain>
Title: Getting Page Not Found error for my custom subdomain setup
ThreadText: # Getting Page Not Found error for my custom subdomain setup
  
  (Asked by: username_0 on 2015-11-23)
  
  I want to setup a new custom subdomain (va.domain.com) within the project of my existing domain (craft.domain.com) using `homestead`.
  
  So I referred to this [this answer on craftexchange](https://craftcms.stackexchange.com/questions/4717/is-it-possible-to-route-a-subdomain-to-specific-template-group) and followed all the steps.
  
  I now have a separate folder at the root level called `public_va`. Inside that I have my `index.php`with this define statement that is supposed to change the path:
  
  ```
  define('CRAFT_TEMPLATES_PATH', realpath(dirname(__FILE__) . "/../templates_va").'/');
  
  ```
  
  Inside of the `craft`folder I have created a folder called `templates_va` that is a sibling of the existing `templates` folder. And I put in a simple index.html file in just for testing.
  
  Now when I point my browser to `va.domain.com`, it just shows me:
  
  ```
  Page Not Found
  
  The requested URL was not found on this server.
  
  ```
  
  I also tried creating a new (single) section called `va_homepage` in the CP backend but I get the same error.
  
  What am I doing wrong? How do I fix this? My error logs inside my vagrant box show nothing. The domain itself has been setup correctly via homestead. I verified by routing request to a static file.
  
  **Tags:** routing, subdomain
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-11-23. Score: 1 | Accepted answer
  
  This is now fixed. The dynamic path to the new templates folder was wrong:
  
  ```
  define('CRAFT_TEMPLATES_PATH', realpath(dirname(__FILE__) . "/../templates_va").'/');
  
  ```
  
  
  ---
  
  