Daniel Rodriguez's picture

104/5000

I need to make a query, how can I change port 80 on my Moodle server? help me please

Forum: 
Jeremy Davis's picture

It's pretty straight forward really.

Firstly add the new port to the Apache ports config file. I.e. to use 8443 for HTTPS (instead of 443):

echo "Listen 8443" >> /etc/apache2/ports.conf

Then edit the Apache moodle.conf file and change where it specifies port 443 and change it to 8443. E.g. edit using nano:

nano /etc/apache2/sites-available/moodle.conf

And change this line:

<VirtualHost *:443>

To:

<VirtualHost *:8443>

Then restart Apache to apply the change:

systemctl restart apache2

Add new comment