Installing multiple instances on one server

I’m working on creating multiple installs, following virtual host instructions at Host Multiple Domains on One Server or IP with Apache or Nginx to allow multiple domains on my server. I am using the Apache virtual host configuration.

I have my two OJS installs in different directories: the first at /var/www/html, and the second at /home/bweigel/subdomain-test. Each is installed from Git.

I have two entries in my VHost configuration:

<VirtualHost *:80>
ServerAdmin my@email.ca
   DocumentRoot /var/www/html
   ServerName publishing2.arcabc.ca
   ErrorLog logs/publishing2-error_log
   CustomLog logs/publishing2-access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin my@email.ca
   DocumentRoot /home/bweigel/subdomain-test
   ServerName publishing.arcabc.ca
   ErrorLog logs/subdomain-test-error_log
   CustomLog logs/sudomain-test-access_log common
</VirtualHost>

With this setup, I have normal access to the working OJS install at http://publishing2.arcabc.ca. But the second install shows a “403 Forbidden” error when trying to access the domain: “You don’t have permission to access / on this server.”

The user and group permissions are, so far as I know/understand, the same as they are in the working install. Am I missing something?

This is more of an apache question than a PKP software question, but you’ll find that you need to configure apache to allow access to directories via the Directory directive, at least.

Depending on your Linux flavor and configuration, you may also have restrictions via the filesystem permissions or via selinux which prevent the apache httpd daemon from reading the contents of a user home directory.

Thanks! I’ll give that a try. If I can’t sort that out, would it make more sense to be putting these other instances into /var/www/ instead?

Update: Yes, placing my directories in /var/www/newdirectory solves this problem. Thanks for the help.

1 Like