Disable or redirect the default web interface

Rund um die Software von Revolution Pi
Post Reply
sirockin
Posts: 5
Joined: 22 Oct 2019, 15:01
Answers: 0

Disable or redirect the default web interface

Post by sirockin »

I have my own web interface that I want to serve from my Rev Pi. How do I disable the default Web Interface, or better still, redirect it to another port?

Thanks!
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Disable or redirect the default web interface

Post by dirk »

Hi sirockin, you can do the following:
Stop the web server

Code: Select all

systemctl stop apache2.service
Disable the web server

Code: Select all

systemctl disable apache2.service
sirockin
Posts: 5
Joined: 22 Oct 2019, 15:01
Answers: 0

Re: Disable or redirect the default web interface

Post by sirockin »

Thanks Dirk.

And if I want to still see the interface but on a different port. Is there a config file somewhere where I can change the port?
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Disable or redirect the default web interface

Post by dirk »

Dear sirockin, have a look at the documentation of the Apache webserver how you may change the listening port. Maybe this link helps you.
sirockin
Posts: 5
Joined: 22 Oct 2019, 15:01
Answers: 0

Re: Disable or redirect the default web interface

Post by sirockin »

Thanks. So the complete answer is to change the port from default (80) to (in the following example) 90:

1. In file ' /etc/apache2/sites-enabled/000-default.conf', change '<VirtualHost *:80>' to '<VirtualHost *:90>'
2. In file /etc/apache2/ports.conf change 'Listen 80' to 'Listen 90'
3. Stop then restart the service using 'systemctl stop apache2.service' then 'systemctl start apache2.service'
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Disable or redirect the default web interface

Post by dirk »

Dear sirockin, thank you for your positive response.
ivan.chonin@axbul.bg
Posts: 44
Joined: 28 Oct 2020, 09:36
Answers: 0

Re: Disable or redirect the default web interface

Post by ivan.chonin@axbul.bg »

Hello,

We have the same issue with the new OS bullseye.
Can we still use the same setting solution?
User avatar
p.rosenberger
KUNBUS
Posts: 89
Joined: 03 Jul 2020, 11:07
Answers: 1

Re: Disable or redirect the default web interface

Post by p.rosenberger »

Hi Ivan,

as you'll see you will be redirected to port 41443 by default. We implemented the redirect as extra Debian package. You can remove it with the following command:

Code: Select all

sudo apt remove revpi-webstatus-redirect
It might be necessary to reboot you RevPi to see the result. Or reload the apache webserver configuration:

Code: Select all

sudo systemctl reload apache2
After this the default Apache page will be shown at port 80.
Now you can place you own page in the html root.

If you want to use your own application on port 80 you need to disable the default sites of apache:

Code: Select all

sudo a2dissite 000-default.conf
And you need to comment out the

Code: Select all

Listen 80
in the file

Code: Select all

/etc/apache2/ports.conf
. If you also need port 443 you will also need to comment out the lines with

Code: Select all

Listen 443
(see https://askubuntu.com/questions/846647/ ... fault-conf for details).

And then you need to restart the apache webserver:

Code: Select all

sudo systemctl restart apache2
Best Regards
Philipp
Post Reply