Setting Moodle URL

Setting Moodle URL

by S4tter S -
Number of replies: 3
Hello,
I have a new server moodle installed in > C:\xampp\htdocs\moodle
I accede with http://localhost/moodle

Im trying to change the URL to moodleserver.companyname.com

I have edit this configuration files:

C:\xampp\apache\conf\httpd.conf > servername moodleserver.companyname.com:80
C:\xampp\apache\conf\extra\httpd-ssl.conf > servername moodleserver.companyname.com:443
C:\xampp\htdocs\moodle\config.php > $CFG->wwwroot   = 'http://moodleserver.companyname.com:443';

I have certificates files .crt and .key on your routes.

When I try go to http://localhost/moodle redirects me to https://moodleserver.companyname.com but i get error.
When I try go to https://moodleserver.companyname.com i also get error.

Is there another configuration file to change the URL ? or another way through the site administration ?

Thanks,

Average of ratings: -
In reply to S4tter S

Re: Setting Moodle URL

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Well, what error are you getting?
In reply to Emma Richardson

Re: Setting Moodle URL

by S4tter S -
In access.log

"GET /moodle/ HTTP/1.1" 303 1503 "

In the browser


In reply to S4tter S

Re: Setting Moodle URL

by Gregor McNish -
Picture of Particularly helpful Moodlers
if you're running the site on a local machine, then you'll need to make sure it recognises itself as the machine/domain name you want it to. If this isn't setup with DNS on your local network, you can edit your hosts file to put an entry for your machine/domain name in as an alias to localhost 127.0.0.1
Average of ratings: Useful (1)