have moodle.org/moodle, want moodle.org

have moodle.org/moodle, want moodle.org

Clay Burell -
Колькасьць адказаў: 14
I really did search before asking this усьмешка

I used this very good screencast tutorial by Eric Hagley to install 1.8.2 on my VPS cPanel. It worked fine, except that it resulted in my moodle showing up as kismoodle.org/moodle.

I want the simple kismoodle.org to work instead.

Right now, 1.8.2 is installed in public_html, along with index.html and index.php.

Is there a simple "move file" or "move folder" operation I can do in cPanel to make Moodle show at kismoodle.org?

Eric cautions against security risks to data by doing things otherwise, but I have to think there's a safe way to avoid the subfolder url. Isn't there?

Many thanks усьмешка
Сярэдняе рэйтынгаў: -
У адказ на Clay Burell

Re: have moodle.org/moodle, want moodle.org

Richard Enison -

CB,

As IA points out, yes, you can move aaaaaaaaaaaaaaaall the files and subfolders of Moodle up to the parent directory, but this would be a highly inefficient and potentially dangerous solution (not in the sense of a security risk, but what if there were a power outage at the server while a subsubfolder was being moved?). A much simpler way to go, if you have access to your web server configuration file, is to edit it to point to the Moodle folder.

In cPanel, select File Manager and navigate to the folder where the file is. If you are using Apache, this would be httpd.conf. [EDIT:] Select the file, then select Edit File on the right side of the File Manager. [End EDIT] Find the line that begins DocumentRoot that is not commented out (doesn't have a # in front of it) and add /moodle to the pathname. If you have more than one host on the same server (unlikely), do this to the DocumentRoot directive (line) that applies to your Moodle host. In that case, it might be in a separate file Included in httpd.conf.

If you are using IIS instead of Apache, see http://moodle.org/mod/forum/discuss.php?d=77868#p347092.

RLE

У адказ на Richard Enison

Re: have moodle.org/moodle, want moodle.org

John Isner -
yes, you can move aaaaaaaaaaaaaaaall the files and subfolders of Moodle up to the parent directory, but this would be a highly inefficient and potentially dangerous solution

I'd like to put in a plug for the Unix way of doing it. You can use if you have a Unix server and shell access. I have shell access to all my hosted accounts -- you may have to pay a little more and/or send them a copy of your driver's license to get it, but it's well worth it.

Here's how you would hoist the contents of the moodle directory up to the parent using the shell:

cd public_html
mv moodle/* .
rmdir moodle
У адказ на Clay Burell

Re: have moodle.org/moodle, want moodle.org

Just H -
Hi Clay

I'd say just go with the answer from Iñaki, i.e. either ftp into kismoodle.org/moodle or use file manager in cPanel and just drag and drop all the files in that directory into kismoodle.org. This will take a couple of minutes at most.

You'll then have to update your config.php file to reflect this change:

Under "2. WEB SITE LOCATION" change:

$CFG->wwwroot = 'http://kismoodle.org/moodle';

to

$CFG->wwwroot = 'http://kismoodle.org';

Under "3. SERVER FILES LOCATION" delete:

/moodle

from the end of the "$CFG->dirroot = " entry

Richard's solution, although technically valid, IMHO based on your question is way too complicated for your given situation.

Regards
H
У адказ на Just H

Re: have moodle.org/moodle, want moodle.org

Richard Enison -

HS,

Let me get this straight. Moving hundreds and hundreds and hundreds of files and folders from one folder to another (which, by the way, CB asked how to do in cPanel and neither IA nor you has answered that) and then changing two pointers in config.php is a simple solution, but just changing one pointer in httpd.conf is way more complicated. That's what I thought. Just checking.

RLE

У адказ на Richard Enison

Re: have moodle.org/moodle, want moodle.org

Just H -
Good evening Richard

My apologies my reply to the OP seems to have offended you, it was in no way my intention to do so.

That said, my answer to the OP stands.

Moving the "hundreds and hundreds of files and folders" is a matter of a couple of clicks via an ftp program (such as FileZilla) or via filemanager in cPanel (depending on which version).

I believe the "filemanager" part of my original post answered the OP's question re how to do so in cPanel, again, this is obviously dependent on the version of cPanel which we don't know at this time, hence mentioning ftp.

As for making a change to one file as opposed to another, then yes, based on the OP's post I would say it would be far simpler for the OP to make a couple of simple changes to a Moodle file he can find easily, as opposed to making changes to the Apache config file. This also leaves his server in the state he wishes it to be i.e. his Moodle install in the root directory rather than a sub directory.

Regards
H


У адказ на Just H

Re: have moodle.org/moodle, want moodle.org

Clay Burell -
Richard, Harry, Inaki,

Thanks all for your helpful input. I'm up and running after doing the following, based on Inaki's suggestion, and before reading any of your other replies (*drat*).

Since the install was new, I just deleted and started over.

Instead of unzipping 1.8.2 on cPanel (version 10 (RC1), by the way) into a "moodle" directory in public_html, I unzipped it on my computer and FTP'd its contents into public_html without the directory.

Otherwise, I followed Eric Hagley's instructions in the tutorial.

Using FireFTP to upload the unzipped 1.8.2 onto the VPS took a good while - probably 30-45 minutes, since there were over 4,000 files when unzipped - but I was at school and so just did other stuff while it loaded.

I suspect all the alternative approaches suggested above might have done the job as well, so again, thanks for that.

My problem as "an advanced kindergartener" in cPanel, PHP, and MySQL, is that I don't know how to drive cPanel easily enough to locate the files, and I'm also unfamiliar with using Unix commands etc.

But at least the process of creating a MySQL db and editing php files has been somewhat demystified this week.

Much homework ahead, though.

Thanks again, all усьмешка
У адказ на Clay Burell

Re: have moodle.org/moodle, want moodle.org

Just H -
Hi Clay

Good to hear you're back on track усьмешка

As you can see there is always more than one way to skin the proverbial cat, all options offered in this thread are valid.

That said, a huge thumbs up for John Isner's method (wish I knew that one on the numerous occasions I've had to do the same thing myself . . . really need to start collecting useful commands like that).

As you have a VPS, I assume you have shell access in which case I'd suggest when you get a chance looking into using CVS for installing and maintaining your site(s). Not that hard to pick up after the initial head scratching and you can easily swap your existing install across in a few minutes. Bottom line, using CVS you can have a new site set up in about 8 minutes and keeping up to date is just a couple of commands - definitely beats 30-45 minutes ftping files ;)

Also, as John kinda hinted at, tracking down a few useful Unix commands can save a lot of time too (when moving about 5 or 6 sites from a hosted server to a knew dedicated server, it took about 10-15 minutes per site using shell as opposed to downloading and then uploading - considering one is an image gallery site with about 10GB of images, might still be uploading now!).

Good luck with your site, and as you can see, anytime you have a problem post away, always someone around to help out усьмешка

Regards
H
У адказ на Just H

Re: have moodle.org/moodle, want moodle.org

Richard Enison -

HS, IA, JI (& CB may lurk, of course, but most of my comments in this post are not addressed to you),

You seem to have missed my point about moving aaaaaaaaaaaaaaall those files. Of course this can be initiated by a few clicks or Linux commands. That's not the issue. The issue is that what is initiated by those commands is unnecessarily inefficient in terms of time, electricity, wear and tear on the hard drive, etc. Furthermore, your file structure can potentially end up a mess if power goes out during those two minutes (unlikely but definitely possible), and if your account is low on disk space, you can run out.

Also, your main point seems to be that my solution, which only involves changing one pointer and moving nothing, is more complicated than changing two pointers and moving thousands of files because the file where my pointer to be changed is, is in a location that CB doesn't know, but he knows where config.php is. So you'd rather tell him to move thousand of files and change two pointers than tell him how to find httpd.conf??? Just checking.

Finally, I don't think CB's goal, as I read his original post, was to have the Moodle file hierarchy rooted in the web document root directory; it was to be able to access his Moodle site from a web browser by typing his domain name without having to add "/moodle".

Anyway, I'm glad he's up and running now, however he got there. smile

RLE

У адказ на Richard Enison

Re: have moodle.org/moodle, want moodle.org

Martin Dougiamas -
Выява Core developers Выява Documentation writers Выява Moodle HQ Выява Particularly helpful Moodlers Выява Plugin developers Выява Testers
I probably shouldn't get involved усьмешка but I just need to say that the move would take only a few seconds at most ... moving files in Linux is a matter of updating a few pointers on the directory table. In the context of a server churning constantly for years on end it's not much.

Unfortunately I don't think cpanel users have any access to httpd.conf.
У адказ на Martin Dougiamas

Re: have moodle.org/moodle, want moodle.org

Richard Enison -

MD,

That's interesting. I didn't know cPanel was so restrictive. I thought it was up to each web hosting service to decide that (but see paragraph 3 below).

  1. Last year, I got involved with Moodle when I installed one for a client. His website used Webmin, which is a lot like cPanel, and I did have access to httpd.conf. On the other hand, the server was his; he was not using a commercial web host.
  2. About 10 years ago, I was webmaster for the same client, administering a website at a commercial host and using cPanel (obviously a much earlier version). I don't remember whether we had access to httpd.conf, but I suspect not because I do remember using .htaccess. But I thought that was because of the web host's choice, not a restriction of cPanel.
  3. Come to think of it, a web host probably has a single httpd.conf file for all client websites on the same machine, so they certainly wouldn't grant access to it to the clients. But CB's post didn't say he was using a commercial web host service. Maybe he is using a server owned by the school he works for.
  4. My estimate of two minutes instead of a few seconds was based on an earlier post in this thread, by HS. But I concede that he did say "at most". Obviously, neither of us is a hardware expert.
  5. I just saw IA's latest post in this thread. I guess I should have known that moving files only involves changing directory entries, so it wouldn't use up additional disk space. Reminds me of some clients of mine who drove me nuts because the only way they knew to copy a WordPerfect document was to open it and do a Save As. Very inefficient!
  6. Still, changing one pointer versus thousands... But he's got a point about the risk of messing up httpd.conf if you don't know what you're doing. I hope CB wasn't insulted by that remark of IA's. smile

RLE

У адказ на Richard Enison

Re: have moodle.org/moodle, want moodle.org

Iñaki Arenaza -
Выява Core developers Выява Documentation writers Выява Peer reviewers Выява Plugin developers

So you'd rather tell him to move thousand of files and change two pointers than tell him how to find httpd.conf???

The failure mode of both actions is quite different.

If you screw your files when moving them (which takes just a few seconds on Unix/Linux and needs no additional disk spaces at all), you just need to wipe and re-upload them. This is the worst case scenario.

If you screw your httpd.conf (which is really easy if you don't know what you are doing, and I'd say this is the case), you can lock yourself out of your site, maybe even out of your control panel. So unless you have shell access, and the knowlegde to fix things, you are toast. You may need to call your provider, open a trouble ticket and so on.

If you know what you are doing, what the consequences are and how to recover from them, it ok to choose the best/fastest solution. If you don't, you should be using the best failure mode solution, so you can recover easily if things go wrong. At least that what I'd do.

Saludos. Iñaki.

У адказ на Just H

Re: have moodle.org/moodle, want moodle.org

Clay Burell -
Harry (and everybody else),

Many, many thanks for pointing this acolyte to the (a?) next learning task in this whacked world. I'm about to Google CVS tutorial etc and see what I can find.

Point noted on John Isner's advice. I'll revisit it after a few of those preliminary head-scratches падморгваньне

Clay