Installing moodle into its own directory

Installing moodle into its own directory

rowan trimmer發表於
Number of replies: 12

Hello,

I am new to this and I have an Apache server with Wordpress running and it is installed in the root. Am I able to create a folder say called moodle in the root and then install moodle into that folder so it doesn't get mixed up with the WP install?

Kind  regards

Rowan




評比平均分數: -
In reply to rowan trimmer

Re: Installing moodle into its own directory

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

This is really an Apache question rather than a Moodle question. You definitely should install Moodle on it's own. For example, if you have installed (you don't say what the OS is) Wordpress at /var/www/html then you might want to install Moodle in /var/www/moodle. You then need to configure Apache to know about this. In httpd.conf add a line

Alias /moodle /var/www/moodle

...and restart Apache. It *might* be a bit more complicated than that, but that's the general idea.

In reply to Howard Miller

Re: Installing moodle into its own directory

rowan trimmer發表於

Hello, 

We use a host Storm Internet to host our website so I just wondered if it was possible to install moodle into its own subfolder

Regards

Rowan







In reply to rowan trimmer

Re: Installing moodle into its own directory

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

In that case, it's a question for Storm internet. You want to know how to create 'virtual directories' or something like that (the name varies for the same thing). 

I'd be very surprised if you can't. 

In reply to Howard Miller

Re: Installing moodle into its own directory

rowan trimmer發表於

I have been trawling the internet and quite often moodle gets placed into a sub folder off the root called "moodle" so that answers my question. I can just create the sub folder in FTP.


Thanks

Rowan


In reply to rowan trimmer

Re: Installing moodle into its own directory

Rick Jerz發表於
Particularly helpful Moodlers的相片 Testers的相片

Your situation is somewhat common.  One installs WordPress into their root, and then wonders about how to install other products.

For me, I like to keep applications separate.  I would install WordPress into ..root/WordPress, Moodle into ..root/moodle, joomla into ..root/joomla, etc.  This makes updating each application easier, and helps you keep your web server organized.  It also will help when it comes time to update applications.

Well, you didn't do it this way (probably because you did not anticipate the need for moodle, or didn't think ahead.)  I suggest that you ask your hosting company how to move the install of your WordPress into its own folder.  Your "homepage" can be created that gives your customers the ability to choose any of your products.

There are many ways to have both applications installed.  My comments are only suggestions.

In reply to rowan trimmer

Re: Installing moodle into its own directory

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

Be very careful. If you install Moodle in a subfolder of Wordpress then you might get weird errors. The reason is that Wordpress has a .htaccess file that rewrites the URLs (if you set that up). This will also affect (and break) Moodle. 

評比平均分數:Useful (2)
In reply to rowan trimmer

Re: Installing moodle into its own directory

Emma Richardson發表於
Documentation writers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片

Not really a question for host.  Yes, you can install in a subfolder and you will just access at www.yourdomain.com/moodle

In reply to Emma Richardson

Re: Installing moodle into its own directory

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

You're noticing that Wordpress is there already?

In reply to Howard Miller

Re: Installing moodle into its own directory

Emma Richardson發表於
Documentation writers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片

Sure - as long as you access it with the /moodle it should be fine.  I have set up several sites like this - actually had one moodle site running within another moodle site before.  Have loaded moodle within wordpress, wordpress within another site all on hosted server.  As long as you direct the url to the folder, it works great.

In reply to Emma Richardson

Re: Installing moodle into its own directory

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

Ok - not wishing to be a pain but it doesn't if you set up URL rewrites in .htaccess for Wordpress. That will also affect the Moodle install in the sub-folder and very odd things happen. 

I think it's better not to recommend this. Best (better?) practice is to keep applications separate.

評比平均分數:Useful (1)
In reply to Howard Miller

Re: Installing moodle into its own directory

Emma Richardson發表於
Documentation writers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片

I would totally agree - always better to keep them separate if possible - I was just answering that it can be done.  If you are just firing one up for testing, it is sometimes a simple alternative.

In reply to rowan trimmer

Re: Installing moodle into its own directory

Dominique-Alain Jan發表於
Testers的相片

Hi Rowan,

I have nothing new to tell you here, but I want to support what Rick and Howard said.

First, in my experience, it is better to separate the services you host on your server in separate folders. Doing this you insure that you are not deleting anything about services hosted in sub folders when you upgrade, change or delete some files and folders in the root folder. Sometimes you must reinstall a service from scratch and when it is laying in the main root folder it is easy to delete sub-services by mistake (already did it by the past).

Secondly, with Wordpress, Moodle as with other services you may use .htaccess as Howard mentionned and the inheritance system makes it tricky to manage settings this way for the different services you host in sub-folders.

Thirdly, in separating your services in different folders in the root folder, let you create easily virtual hosts on your Apache2 server (you will find how-to and docs about this in many places on the web and above all on the Apache official pages). Therfore you can have for example your Wordpress at the address : http://blog.yourserver.com and your Moodle at http://learning.yourserver.com, for example. Neat and clean.

HTH

-dajan