Disable or redirect the default web interface
Disable or redirect the default web interface
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!
Thanks!
Re: Disable or redirect the default web interface
Hi sirockin, you can do the following:
Stop the web server
Disable the web server
Stop the web server
Code: Select all
systemctl stop apache2.service
Code: Select all
systemctl disable apache2.service
Re: Disable or redirect the default web interface
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?
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?
Re: Disable or redirect the default web interface
Dear sirockin, have a look at the documentation of the Apache webserver how you may change the listening port. Maybe this link helps you.
Re: Disable or redirect the default web interface
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'
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'
Re: Disable or redirect the default web interface
Dear sirockin, thank you for your positive response.
-
- Posts: 44
- Joined: 28 Oct 2020, 09:36
Re: Disable or redirect the default web interface
Hello,
We have the same issue with the new OS bullseye.
Can we still use the same setting solution?
We have the same issue with the new OS bullseye.
Can we still use the same setting solution?
- p.rosenberger
- Posts: 91
- Joined: 03 Jul 2020, 11:07
Re: Disable or redirect the default web interface
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:
It might be necessary to reboot you RevPi to see the result. Or reload the apache webserver configuration:
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:
And you need to comment out the in the file . If you also need port 443 you will also need to comment out the lines with (see https://askubuntu.com/questions/846647/ ... fault-conf for details).
And then you need to restart the apache webserver:
Best Regards
Philipp
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
Code: Select all
sudo systemctl reload apache2
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
Code: Select all
Listen 80
Code: Select all
/etc/apache2/ports.conf
Code: Select all
Listen 443
And then you need to restart the apache webserver:
Code: Select all
sudo systemctl restart apache2
Philipp