Moodle installation to a folder in www

Moodle installation to a folder in www

by Halim Asa -
Number of replies: 14

I will buy ssl for my site. But ssl prices (too expensive for all subdomains). Therefore, I want to install my moodle system in a folder in the root directory. Like domainname.com/lms ....

Would a setup like this create a problem for moodle?

So is there any difference between installing Moodle installation on subdomain (moodle.domainname.com) or installing it in a folder under www (domainname.com/lms)? 

Which one do you recommend.

Average of ratings: Useful (1)
In reply to Halim Asa

Re: Moodle installation to a folder in www

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

You can install Moodle in a folder in your main site or subdomain, I don't think either option is better. But beware: if the main site has specific settings for Apache or PHP these may conflict with settings for Moodle. For example this can happen if the main site is WordPress with a .htaccess file containing settings needed for WordPress but that cause problems for Moodle.

Let's Encrypt issues certificates for TLS (SSL) for free of charge. Many managed hosting services integrate with Let's Encrypt.

Average of ratings: Useful (3)
In reply to Leon Stringer

Re: Moodle installation to a folder in www

by Halim Asa -
Greetings, @Leon, @Ken, @Rick

Thank you very much for your helpful comments, I understand from your comments.
It will be easier to run the domain name as one domainname.com/lms
I like it very much because lms is short (I will never remove the moodle logo from the bottom of my site.) My domain was a bit long, I am changing that today. I bought a shorter domain name. And yes, as you mentioned, I have a wordpress site, I will run it from the mydomain.com/wp folder, my home page will be very plain and I will be using bootstrap v5 in the root directory of mydomain.com.
And yes I will buy SSL single domain. Is there any way to get @Rick SSL for free? I do not use VPS like you. I don't use it for now, but it might be in the future.
Average of ratings: Useful (1)
In reply to Halim Asa

Re: Moodle installation to a folder in www

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
The most common combination is WordPress as the main domain, say example.com, and the other applications under example.com/something - all without www.
Average of ratings: Useful (2)
In reply to Halim Asa

Re: Moodle installation to a folder in www

by Ken Task -
Picture of Particularly helpful Moodlers

While Leon's answer is mostly correct (no offense Leon), over that last 3 weeks have been attempting to assist a person hosted on A2 hosting that uses cPanel and 'Easy Apache' (for choosing the version of php to run in directories/apps of the server).  Because EA uses an EA configured mod_ssl Let'sEncrypt (LE) docs hasn't worked for me.  A2 docs say it's possible but don't provide any advice as to how to adjust to get it to work.

I do use LetsEncrypt on other servers that don't have EA nor cPanel and haven't had any issues with LE.

So ... answer really could be 'depends' on how hosted/with whom/etc.. :|

'SoS', Ken


Average of ratings: Useful (1)
In reply to Halim Asa

Re: Moodle installation to a folder in www

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
It is probably a matter of personal preference, with some thought put into it (as Leon and Ken have provided.) Some of this depends upon what else you might want to do with your server.

In my own case, I use my server for many purposes, so I have my domain be www.mydomain.com. Then, I like to put moodle below this, as in www.mydomain.com/moodle. I have found that using a folder name called "moodle" is easier for me, but you could just as well use a different folder name. Then, if I was going to install a different product on this same server, such as WordPress, I would put it in a folder called www.mydomain.com/wordpress.

Since my SSL is for my main domain (www.mydomain.com) moodle also uses it. Yep, I only need one SSL. (I am not an SSL expert.) I think there are ways to use free ssl's. I get a free SSL with my VPS, and I install it easily with cPanel on my VPS.

But this is just the way that I have done it forever (meaning for about 12 years.) It's your choice. Students learn that they can bookmark www.mydomain.com/moodle in their browser just as easily as any other URL.

There are ways to create problems for yourself, such as putting moodle and Wordpress into the same folder. You end up with one big mess.
Average of ratings: Useful (2)
In reply to Rick Jerz

Re: Moodle installation to a folder in www

by Ken Task -
Picture of Particularly helpful Moodlers

My advice ... one domain ... use subdirectories.

Observation with my own servers ... one on RackSpace and one on Google Compute Engine ... script kiddies tend to look for vulnerabilities at document root.  Error logs of server indicate that ... looking for known wp directories and scripts or moodle directories and scripts or joomla directories or scripts ... or X dirs and scripts.

Used to have a lot of fun ... copied  IIS 404 403 error pages which proudly announce how to attack the 'flavor' of the server on a *linux* box, then sat back and watched error logs for vulnerability probes on Windows servers ... which didn't work for obvious reasons! smile

As an unintended and side affect of using static cover page on server that points to apps directories, script kiddie scan's and or attempts only produce errors.    Seen in logs, I can use servers networking firewall to block those bad actor IP addresses ... or even a range of IP addresses such that those IP's never see anything of my server again.    Not a Ft. Knox, but ...

There's always a  flip ... yin/yang ... with some bad actors, have just declared WWW3! :|

My 2 cents.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Moodle installation to a folder in www

by James Steerpike -
I use Apache Virtual hosts, a 78 cent a month VPS, 99 cent .xyz domains and LetsEncrypt for my learning. Perhaps not best for production moodle but why mess around when it is so cheap?
A couple of SSL domains for less than $10 a year.
Average of ratings: Useful (1)
In reply to James Steerpike

Re: Moodle installation to a folder in www

by Halim Asa -
I live in Turkey, unfortunately, in our country there is a monster called inflation. Let me explain it this way. In my country, in a period not much longer than this, a service, namely the domain name purchase, was 3 dollars in 2001 ... now 5 dollars, but in 2001 it was 3 dollars 3.6 Turkish Liras. that is, 1 dollar was equal to 1.2 Turkish lira units.

However, while the domain name of 5 dollars is exactly equal to 62 Turkish Lira units, there has been an increase of 50% on dollar unit basis in 20 years, while the unit increase in Turkish Lira has been more than 20 times, therefore we: (3rd class world country economies) Unfortunately Because of the bad decisions made by the world's great actors and our own leaders, we cannot benefit from technology as much as a person in the United States.

My son is only 8 years old today, he wants a good gaming computer from me, but only 5 years ago in my country, I could buy the best computer for just 1.2, but today I have to pay 20 30 to get the best computer.

For this reason, a situation that seems cheap to you can be expensive for me.

Thank you very much for your suggestion. James, hope to see you
In reply to Halim Asa

Re: Moodle installation to a folder in www

by James Steerpike -
I sympathize. I am celebrating tonight because I have managed to pick up ten hours of week, my first steady employment in 9 months.
It all depends on what you are using your site for. A production site, meaning one where students post their work, has to be rock solid. However I have run hundreds of students on a $5 a month plan.
If you are learning and experimenting, prices are very low. I have a blog on a one year free VPS from Alibaba. Other providers also provide a free year. You can create multiple domains, install Moodle with different databases and webservers, create blogs and do anything else you desire. I find reading a text book boring, far better to start doing something and then find a textbook.
Of course it won't be easy. Nothing worthwhile ever is but you will learn the basics of a Sysadmin and a DBA.
One more cheapskate hint. Coursera allow you free access to all their courses. They hide it but look for the audit option. You won't get a certificate or work graded but there is an enormous amounts of high quality training just waiting for you.
Free servers, free software, free training.  What a marvelous time we live in
In reply to James Steerpike

Re: Moodle installation to a folder in www

by Halim Asa -
Hello James, thank you for the suggestion, I'll read the yes blog. Alibaba free server is giving free training management from Australian guy, Chinese guy offers a free vps to publish this site. yes we live in really good times. I hope so. smile thank you so much.
In reply to Halim Asa

Re: Moodle installation to a folder in www

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Halim

I know what the devaluation of local currency and what restrictions on buying foreign currency mean! The latest straw was trying to organize a local web server, a low traffic, hobby application. To find out that the Internet provider stops all incoming connections!
sad

Anyway, what I wanted to say: My "kids" are a bit older ;), if they were junger than say 12, I wouldn't voluntarily send them to gaming or to the global (digital) world for that matter. I would let them grow healthily in the analog world, that is the world we are made for and the substance we are made of.
In reply to Visvanath Ratnaweera

Re: Moodle installation to a folder in www

by Halim Asa -
Hello, @Vishvanat thank you very much for your suggestion. The digital world is more of a necessity than an option for now. Racism is on the rise in my country, as it does all over the world. Street culture is not as innocent as it used to be. Most citizens do not watch the news because of bad events. In general, I and my son feel a little safe as my son's internet access is limited and traceable. In addition, he does not want to leave the house for 1 year due to covid. Curfews continue in my country from time to time. Thank you again for your suggestion. I wish a better world
In reply to Halim Asa

Re: Moodle and the world, analog and digital, healthy and unhealthy [OT]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Halim

[OT] Well this is beyond the Moodle realm - at least the part related to the analog world. I don't think that the (analog) world has taken a dive towards the negative - except for the environment disaster we've already triggered. In fact, there are people who convincingly argue that, as far as violence is concerned, the world was never safer. I know these are average numbers over a long period of time. If you happen to be in a "hot spot" today, then your world, your micro-cosmos, could be burning. Except for such extreme cases the world is perceived. So obviously the state of the "perceiver" reflects heavily on the perception. So we are back to my previous post, about healthy growth. To be honest, the house confinement of an eight year old troubles me.

I know, this sounds esoteric, but being at the bridge of Asia and Europe, I'm sure you understand this way of thinking. [/OT]

Anyway, to connect this to Moodle, the virtual world is something entirely different. a) it is new (in time frames the brain and soul need to rewire) b) the distances don't matter. I am not a visionary to make any statements - but Moodle being educational will help to relieve loss and pain, I believe.

In reply to Visvanath Ratnaweera

Re: Moodle and the world, analog and digital, healthy and unhealthy [OT]

by Halim Asa -
Hi @Visvanath I'm so sorry for the late reply to your message. First of all, thank you very much for sharing your personal feelings with me.

Virtual world and realities ...
Yes, exactly 20 years ago, I met the internet for the first time. It was a big event for my country! With a 56 kbps connection, we were entering the internet door with an audible voice still playing in my ears.

My uncle lived in Austria. He had a difficult working life. Despite this he had a good income, if I remember correctly, a few simple electronics (game) tool can tell you that they begin to be sold in Turkey of about 5 6 years later, the same equipment they brought to Turkey.

Yes, it was normal, so when you are in equal conditions, time and space do not matter. However, when it comes to technology or a better life, it becomes very important where and when you live.

There are still inequalities in most of the geographies we are in. Education has the biggest share in this. Education inequality is as important today as global warming. Yes Moodle, Youtube et al. They play a great role in preventing this inequality (for the life of me and the people around me). One day I wish to see countries developing in the farthest corner of Africa, where we see that today are far behind and lacking everything like the people of a village in the most remote corner of Africa today.