Configure apache to listen on port other than 80

In /etc/apache2/ports.conf, change the port as

Listen 8079

Then go to /etc/apache2/sites-enabled/000-default.conf

And change the first line as

<VirtualHost *: 8079>

Now restart

sudo service apache2 restart

Apache will now listen on port 8079 and redirect to /var/www/html


Open httpd.conf file in your text editor. Find this line:

Listen 80

and change it

Listen 8079

After change, save it and restart apache.