Perhaps I am posting this in the wrong place and I should also check with jumpbox to see if they can help me, but I wanted to see if someone in the moodle community could help me as well.
I am working on a project where I need to have four different web applications running on the same server. The four applications that I need to install are Drupal, CiviCRM, Elgg and Moodle.
I started off by downloading in installing the jumpbox version of Drupal. Then I installed Elgg and CiviCRM on that virtual server which is running on Ubuntu Linux 8.04.
Finally I went to the "Step-by-step Installation Guide for Ubuntu" on the Moodledocs and followed the directions as much as I could, given how the virtual server is configured.
The default Apache directory is /var/data/drupal/ so if in a browser I go to http://localhost my drupal site opens.
My goal is to get my server to work so that if I enter http://localhost/moodle my moodle installation opens up.
However, after downloading and decompressing the file when I get to the step about modifying the default file for apache I don't have a file that is named "default" what I have are file named "default.auto", "default.custom" and "default.off". These all are pointing the jumpbox-app. This file points to the existing drupal site and I don't want to change where my default website for the host points to.
But when i enter the url http://localhost/moodle I am getting a 403 forbidden request error. How do I get past this for this site?
There are a couple of options, the easier one is to copy the installation files to a folder called Moodle inside the drupal folder. Then run http://localhost/moodle/install.php thereafter the usual ubuntu install rules will take over. The default file for Apache is not "default" it is, or it should be httpd.conf and there are a couple of things that need be edited in it - or maybe not depending on what it is you want to do and what is already in the httpd.conf file already.
As it already reads drupal as the localhost, then anything you put into the drupal folder is accessible via Apache - if it can be served. The only other issue that would concern me is what files does the Server actually serve? There is a setting called:
which should read something like:
By putting the moodle into the right place should get around the 403 error as well. If it doesn't then, still in the httpd.conf file, look at:
# Controls who can get stuff from this server.
Allow from all
That should solve any lingering permissions error from the server anyway.
The other option is to use vhosts to segment your server. Apache.org has enough information to make that work for you.
Do not forget to reset the Moodle folder permissions to 00777 or 02777, whichever works actually.
When you create the Moodle config.php file, during the install, make sure you have it pointing to the right place.
The link tells how to change the default to the new site. Instead I created the new file for moodle, then just enabled that site (I did not run a2dissite, but did run a2ensite) and restarted Apache. Now both are available: http://localhost and http://localhost/moodle
Hope this helps.
The pertinent part is quoted below:
Apache2 has the concept of sites, which are separate configuration files that Apache2 will read. These are available in /etc/apache2/sites-available. By default, there is one site available called default this is what you will see when you browse to http://localhost or http://127.0.0.1. You can have many different site configurations available, and activate only those that you need.
As an example, we want the default site to be /home/user/public_html/. To do this, we must create a new site and then enable it in Apache2.
To create a new site:
Copy the default website as a starting point. sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite
Edit the new configuration file in a text editor "sudo nano" on the command line or "gksudo gedit", for example: gksudo gedit /etc/apache2/sites-available/mysite
Change the DocumentRoot to point to the new location. For example, /home/user/public_html/
Change the Directory directive, replace <Directory /var/www/> to <Directory /home/user/public_html/>
You can also set separate logs for each site. To do this, change the ErrorLog and CustomLog directives. This is optional, but handy if you have many sites
- Save the file
Now, we must deactivate the old site, and activate our new one. Ubuntu provides two small utilities that take care of this: a2ensite (apache2enable site) and a2dissite (apache2disable site).
sudo a2dissite default && sudo a2ensite mysite
Finally, we restart Apache2:
sudo /etc/init.d/apache2 restart "UNQUOTE"