Answers.Body: <p>It's purely apache/httpd configuration issue. Create 2 subdomain demo1.domain.com and demo2.domain.com and have 2 conf file under sites-available and sites-enabled with following config</p>
  
  <p>demo1.domain.com.conf</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  
    DocumentRoot /var/www/html/demo1
  
    ServerName demo1.domain.com
  
    ServerAdmin admin@domain.com
  
    &lt;Directory "/var/www/html/demo1"&gt;
  
      AllowOverride All
  
      Require all granted
  
      Options -Indexes
  
    &lt;/Directory&gt;
  
    ErrorLog  /var/log/apache2/demo1.domain.com.error.log
  
    # Possible values include: debug, info, notice, warn, error, crit,
  
    # alert, emerg.
  
    LogLevel warn
  
    CustomLog  /var/log/apache2/demo1.domain.com.access.log  combined
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>demo2.domain.com.conf</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  
    DocumentRoot /var/www/html/demo2
  
    ServerName demo2.domain.com
  
    ServerAdmin admin@domain.com
  
    &lt;Directory "/var/www/html/demo2"&gt;
  
      AllowOverride All
  
      Require all granted
  
      Options -Indexes
  
    &lt;/Directory&gt;
  
    ErrorLog  /var/log/apache2/demo2.domain.com.error.log
  
    # Possible values include: debug, info, notice, warn, error, crit,
  
    # alert, emerg.
  
    LogLevel warn
  
    CustomLog  /var/log/apache2/demo2.domain.com.access.log  combined
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-28T20:35:29.743Z
Answers.Text: It worked, now two subdomains pointed to two separate directories but the issue I have mentioned still persist.  Errors are like: (Angular) Blocked loading resource from url not allowed by $sceDelegate policy.  URL: http://domain.com/demo1/sites/all/modules/civicrm/tools/extensions/civihr/uk.co.compucorp.civicrm.hrleaveandabsences/views/my-leave/components/my-leave-container.html and in console I can see net::ERR_ABORTED and Failed to load resource: the server responded with a status of 404 (Not Found).It automatically adding demo1 folder after subdomain name. eg: demo1.domain.com/demo1/sites/
Answers.UserDisplayName: Ashwin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-28T20:38:32.863Z
Answers.Text: Can you check base url in civicrm.settings.php is correct and also the path in directories and resource url are correct. Also try to delete template_c and clear civicrm cache.
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-28T20:53:13.840Z
Answers.Text: Fixed. It was issue with base URL in civicrm.settings.php
Answers.UserDisplayName: Ashwin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-28T13:19:25.527Z
Answers.LastActivityDate: 2017-12-28T13:19:25.527Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I have installed multiple CiviHR on Amazon AWS. </p>
  
  <p>And configured VirtualHost as given below. so I can use the same domain and demo1 and demo 2 as a subdomain of it. </p>
  
  <p><a href="https://i.sstatic.net/VjeN1.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/VjeN1.png" alt="enter image description here"></a></p>
  
  <p>Both CiviHR installation was successful but in domain.com/demo/hr-details I'm not able to see any data that I have added. It displaying blank.</p>
  
  <p><a href="https://i.sstatic.net/55RHm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/55RHm.png" alt="enter image description here"></a></p>
  
  <p>If I click on edit my details button I'm able to see the data I have added. </p>
  
  <p><a href="https://i.sstatic.net/0W8eX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0W8eX.png" alt="enter image description here"></a></p>
  
  <p>Highlighted URLs redirecting to root folder of the server (domain.com/dashboard instead of domain.com/demo1/dashboard). </p>
  
  <p>Is this issue with VirtualHost configuration or something else? </p>
  
Tags: <civihr>
Title: Multiple CiviHR installation in single Amazon AWS instance
ThreadText: # Multiple CiviHR installation in single Amazon AWS instance
  
  (Asked by: username_0 on 2017-12-28)
  
  I have installed multiple CiviHR on Amazon AWS.
  
  And configured VirtualHost as given below. so I can use the same domain and demo1 and demo 2 as a subdomain of it.
  
  [![enter image description here](https://i.sstatic.net/VjeN1.png)](https://i.sstatic.net/VjeN1.png)
  
  Both CiviHR installation was successful but in domain.com/demo/hr-details I'm not able to see any data that I have added. It displaying blank.
  
  [![enter image description here](https://i.sstatic.net/55RHm.png)](https://i.sstatic.net/55RHm.png)
  
  If I click on edit my details button I'm able to see the data I have added.
  
  [![enter image description here](https://i.sstatic.net/0W8eX.png)](https://i.sstatic.net/0W8eX.png)
  
  Highlighted URLs redirecting to root folder of the server (domain.com/dashboard instead of domain.com/demo1/dashboard).
  
  Is this issue with VirtualHost configuration or something else?
  
  **Tags:** civihr
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-12-28. Score: 3 | Accepted answer
  
  It's purely apache/httpd configuration issue. Create 2 subdomain demo1.domain.com and demo2.domain.com and have 2 conf file under sites-available and sites-enabled with following config
  
  demo1.domain.com.conf
  
  ```
  <VirtualHost *:80>
  
    DocumentRoot /var/www/html/demo1
  
    ServerName demo1.domain.com
  
    ServerAdmin admin@domain.com
  
    <Directory "/var/www/html/demo1">
  
      AllowOverride All
  
      Require all granted
  
      Options -Indexes
  
    </Directory>
  
    ErrorLog  /var/log/apache2/demo1.domain.com.error.log
  
    # Possible values include: debug, info, notice, warn, error, crit,
  
    # alert, emerg.
  
    LogLevel warn
  
    CustomLog  /var/log/apache2/demo1.domain.com.access.log  combined
  
  </VirtualHost>
  
  ```
  
  demo2.domain.com.conf
  
  ```
  <VirtualHost *:80>
  
    DocumentRoot /var/www/html/demo2
  
    ServerName demo2.domain.com
  
    ServerAdmin admin@domain.com
  
    <Directory "/var/www/html/demo2">
  
      AllowOverride All
  
      Require all granted
  
      Options -Indexes
  
    </Directory>
  
    ErrorLog  /var/log/apache2/demo2.domain.com.error.log
  
    # Possible values include: debug, info, notice, warn, error, crit,
  
    # alert, emerg.
  
    LogLevel warn
  
    CustomLog  /var/log/apache2/demo2.domain.com.access.log  combined
  
  </VirtualHost>
  
  ```
  
  > **Comments:**
  > **username_0**: It worked, now two subdomains pointed to two separate directories but the issue I have mentioned still persist.  Errors are like: (Angular) Blocked loading resource from url not allowed by $sceDelegate policy.  URL: http://domain.com/demo1/sites/all/modules/civicrm/tools/extensions/civihr/uk.co.compucorp.civicrm.hrleaveandabsences/views/my-leave/components/my-leave-container.html and in console I can see net::ERR_ABORTED and Failed to load resource: the server responded with a status of 404 (Not Found).It automatically adding demo1 folder after subdomain name. eg: demo1.domain.com/demo1/sites/  
  > **username_1**: Can you check base url in civicrm.settings.php is correct and also the path in directories and resource url are correct. Also try to delete template_c and clear civicrm cache.  
  > **username_0**: Fixed. It was issue with base URL in civicrm.settings.php  
  
  ---
  
  