0

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

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

If I click on edit my details button I'm able to see the data I have added.

enter image description here

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?

5

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>
  • 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: domain.com/demo1/sites/all/modules/civicrm/tools/extensions/… 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/ – Ashwin Dec 28 '17 at 20:35
  • 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. – Pradeep Nayak Dec 28 '17 at 20:38
  • Fixed. It was issue with base URL in civicrm.settings.php – Ashwin Dec 28 '17 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.