Windows 11, Stand-Alone, "localhost refused to connect"

Windows 11, Stand-Alone, "localhost refused to connect"

by Peter Raeth -
Number of replies: 0

Under Windows 10, stand-alone Moodle worked fine for me. After upgrading to Windows 11, Moodle would not work. After installing the latest Moodle version, still nothing worked. Kept getting "localhost refused to connect". After reading the forum and a lot of other material, a solution finally resulted. Wanted to offer that solution in case others encounter this problem. Here are the baseline instructions from README, with comments added to show what was done:

HOW TO USE IT
=============

1. Run 'Start Moodle.exe' to start up the system.
    On Windows 11, right-click on 'Start Moodle.exe'.
    Then select "Run as Administrator".

2. Visit http://localhost/ to use your Moodle site! 
    When running for the first time, there are several Q/A screens
    that have to be answered in order to set up Moodle.
    The "Installation System" screen can take quite some minutes
    to complete.

3. Other people have to access it via http://xxx.xxx.xxx.xxx where
    xx.xx.xx.xx is the IP number or name of your Windows computer.

4. If you want to shut down the Moodle server, use 'Stop Moodle.exe'
    On Windows 11, right-click on 'Stop Moodle.exe'.
    Then select "Run as Administrator".

Something Interesting: Stand-Alone Moodle uses Port 80 on the local computer.
Nothing will work if Port 80 is being used by some other application.
To see which Ports are occupied, run Moodle/server/xampp-control.exe.
Then select the "Netstat" button on the right of the dialog. Another
dialog will appear that lists all occupied Ports. Both dialogs offer
very useful information.


Average of ratings: Useful (2)