can't access to moodle from internet

can't access to moodle from internet

Zvonimir Sarcevic發表於
Number of replies: 5
....i could really use some help...

I have home computer that will be a server for moodle ..
Problem is that I've installed only Apache..and I can see a test from the internet (from other computer and other IP) ...

than I've installed Xampp ...I see those test pages from the internet too

Than I've installed moodle (MoodleWindowsInstaller-latest.zip) ..I've followed steps how to install it...and it works only on my computer ...but when I tryed to reach it from the "outside"...I get only blank page...like I dont have a server installed...

I didnt create anyfiles...or change anything after the installation.

All ports are opend...no firewall..etc..


PLEASEEEEE HELP ME....傷心

評比平均分數: -
In reply to Zvonimir Sarcevic

Re: can't access to moodle from internet

Ken Wilson發表於
Hi Zvonimir

Try comparing and copying the $CFG->wwwroot value from the test moodle install into the Windows installer config.php. The default value for $CFG=>wwwroot may have been set to 127.0.0.1 which would not allow access from the Internet. See here for more info.

Also, take a look at the FAQs about blank pages - there may be something in there which helps.

Ken
In reply to Ken Wilson

Re: can't access to moodle from internet

Zvonimir Sarcevic發表於
thanks ..that might be THE problem ..

How be written in that config.php

I've installed moodle in C:\moodle, and I've set up IP 192.168.1.2

what should i write the?

$CFG->192.168.1.2/moodle
In reply to Zvonimir Sarcevic

Re: can't access to moodle from internet

Richard Enison發表於
ZS,

No.
  1. First of all, 192.168.1.2 is not a public Internet IP address. See http://moodle.org/mod/forum/discuss.php?d=67753#p304909.
  2. If you only want to be able to access your Moodle over the Internet, use your public, fixed IP address or domain name. If you want to be able to access it over a LAN as well, there are techniques for doing that, such as the post linked to in #1 above.
  3. The syntax in your line of code is wrong. If your public IP address points to C:\, then write

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

    If it points to C:\moodle, then

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

    where xxx.xxx.xxx.xxx is your public IP address. If it points anywhere else, you've got Moodle in the wrong place! Look in your Apache configuration file httpd.conf to see what your web document root is. Look for a line that begins DocumentRoot with no # in front of it. That will tell you where the IP address (or domain name) points to. For example,

    DocumentRoot "C:\"

    However, making the root directory of your C: drive your web document root is very unusual and not recommended at all, especially for the Internet, for security reasons. That would mean that, unless extra directives are used to define certain folders (directories) as web-inaccessible, or unless you have other hard drives, your entire hard disk would be accessible!
  4. If you don't have a fixed public IP address and are using a variable IP service, use your domain name. E.g.

    $CFG->wwwroot = 'http://www.sarcevic.edu';
  5. Using the Windows package and just changing wwwroot to get accessibility over the Internet is a very bad idea for security reasons, especially without a firewall. I would suggest separately installing Apache, PHP, MySQL and a generic download of Moodle, and using a firewall.
RLE
評比平均分數:Useful (2)
In reply to Richard Enison

Re: can't access to moodle from internet

Zvonimir Sarcevic發表於
thanks man you helped me a LOT!...

I've manage it to acces from the internet...;)

1. 192.168.1.2 is fixed internal IP from my computer to Dlink router...and from router to internet i dont have fixed IP .

I'll create a "sarcevic.dnsalias.net" and pinpoint my internet IP to dnsalias.net everytime it changes with one program (forgot its name)...

should I write
$CFG->wwwroot = 'http://sarcevic.dnsalias.net/moodle';

or
$CFG->wwwroot = 'http://192.168.1.2/moodle';



what should I write here?
$CFG->dbhost = 'localhost';



in httpd.conf I have
DocumentRoot "C:/moodle/server/moodle"



2. security issues

My father had moodle installed...any someone crashed his server...傷心

Should I install moodle on other partition?
d: or e: ...and just install moodle and apache?

I couldnt find anywhere how to set up separately Apache, PHP and MySQL, and than integrate Moodle ..to make it works... 傷心

I have firewall enabled at my router...and I tryed a few firewalls..but any softwer firewall (Kerio, etc) that I've used...they blocked acces to Moodle...

In reply to Zvonimir Sarcevic

Re: can't access to moodle from internet

Richard Enison發表於
ZS,

  1. If your main Moodle files (index.php, config.php, install.php) are in C:/moodle/server/moodle, I would use

    $CFG->wwwroot = 'http://sarcevic.dnsalias.net';

    If they are in C:/moodle/server/moodle/moodle, then I would use

    $CFG->wwwroot = 'http://sarcevic.dnsalias.net/moodle';

    I believe

    $CFG->dbhost = 'localhost';

    is okay if your database server is on the same machine as your web.
  2. I don't think it matters what drive or partition you put things on. You can have everything on the same drive letter or different ones; you can even have Moodle, the database, and the data folder on different computers. For info on installing Apache, PHP and MySQL, and Moodle, see http://docs.moodle.org/en/Installing_AMP and http://docs.moodle.org/en/Windows_installation_using_XAMPP#Get_XAMPP.21

    The latter appears to be more secure than the XAMPPlite installation you get with the Moodle Windows Package download, because it doesn't force you to use root as the db user name. Other than that, I don't know if it is as secure as the former.

    I'm not surprised your firewall won't allow access to Moodle. Normally PC users are not hosting a website on their computer, so firewalls keep them from sending web pages out over the Internet, or responding to msgs. from web browsers. You need to change the settings in your firewall to allow these. I'm not familiar with the firewall you have, so I can't help you with that. I'm sure it comes with instructions, or at least help screens.
RLE
評比平均分數:Useful (1)