Hello, in this post, I will show you how to install Apache GUI on Debian 10.
Generally, a SysAdmin uses the command line interface to configure server applications. However, there are web interfaces that facilitate the process of configuring these tools. In a server in production state, Apache plays an important role because it is the web server, which is why it must be correctly configured. With this in mind, it is helpful to install Apache GUI to make quick and easy adjustments to it.
Apache GUI is a free and open source web tool that is designed to help Administrate the Apache Web Server. Some of its functions are:
- Edit, Search and Validate your Configurations.
- Manage VirtualHosts.
- Edit web documents right from your web browser.
- Tail, download and search your logs.
- Install and remove Apache modules.
- View runtime statistics from your web server.
- Record, search and graph detailed transactions.
As you can see, this is a very useful tool especially if you are starting in the sysadmin world or if you prefer the convenience of a web interface over the terminal.
So, let us do it.
Install Apache GUI on Debian 10
1.- Install Java on Debian 10
Apache GUI is a tool created in Java. So first we have to install it on our system. However, it’s a good idea to update the system first.
So, open a terminal session and run the following command:
:~$ sudo apt update && sudo apt upgrade
In case you don’t have sudo enabled, you can read the following post:
How to enable sudo on Debian 10?
Once everything is in order, we can continue.
There is an open-source version of Java in the official Debian repositories which is the OpenJDK. It’s good for us with this version.
So, install it with the following command:
:~$ sudo apt install openjdk-11-jre Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: adwaita-icon-theme at-spi2-core ca-certificates-java fontconfig fonts-dejavu-extra glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme java-common libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data libatspi2.0-0 libcairo-gobject2 libcroco3 libdatrie1 libepoxy0 libfribidi0 libgail-common libgail18 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgif7 libgraphite2-3 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libharfbuzz0b libjson-glib-1.0-0 libjson-glib-1.0-common libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libproxy1v5 librest-0.7-0 librsvg2-2 librsvg2-common libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libwayland-client0 libwayland-cursor0 libwayland-egl1 libxcursor1 libxkbcommon0 openjdk-11-jre-headless Suggested packages: default-jre gvfs librsvg2-bin fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic The following NEW packages will be installed: adwaita-icon-theme at-spi2-core ca-certificates-java fontconfig fonts-dejavu-extra glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme java-common libatk-bridge2.0-0 libatk-wrapper-java libatk-wrapper-java-jni libatk1.0-0 libatk1.0-data libatspi2.0-0 libcairo-gobject2 libcroco3 libdatrie1 libepoxy0 libfribidi0 libgail-common libgail18 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgif7 libgraphite2-3 libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libharfbuzz0b libjson-glib-1.0-0 libjson-glib-1.0-common libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libproxy1v5 librest-0.7-0 librsvg2-2 librsvg2-common libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libwayland-client0 libwayland-cursor0 libwayland-egl1 libxcursor1 libxkbcommon0 openjdk-11-jre openjdk-11-jre-headless 0 upgraded, 57 newly installed, 0 to remove and 0 not upgraded. Need to get 68.7 MB of archives. After this operation, 293 MB of additional disk space will be used. Do you want to continue? [Y/n]
Then, check the installed version.
:~$ java -version openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment (build 11.0.6+10-post-Debian-1deb10u1) OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Debian-1deb10u1, mixed mode, sharing)
In this case, we have installed version 11. An LTS version and quite stable.
2.- Install Apache and PHP on Debian 10
Apache GUI is used to manage Apache. Therefore, it needs to be installed. To do this, run the following command:
:~$ sudo apt install apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libbrotli1 libcurl4 libjansson4 liblua5.2-0 Suggested packages: apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser The following NEW packages will be installed: apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libbrotli1 libcurl4 libjansson4 liblua5.2-0 0 upgraded, 12 newly installed, 0 to remove and 49 not upgraded. Need to get 2938 kB of archives. After this operation, 9599 kB of additional disk space will be used. Do you want to continue? [Y/n]
By default, the service is enabled and started with the installation. However, remember to enable ports 80 and 443 in the firewall.
Then, complement the Apache installation with a programming language such as PHP and its modules.
:~$ sudo apt install php7.3 php7.3-imap php7.3-xml libapache2-mod-php7.3 php-pear Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libc-client2007e libsodium23 libxslt1.1 mlock php-common php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-readline psmisc Suggested packages: uw-mailutils The following NEW packages will be installed: libapache2-mod-php7.3 libc-client2007e libsodium23 libxslt1.1 mlock php-common php-pear php7.3 php7.3-cli php7.3-common php7.3-imap php7.3-json php7.3-opcache php7.3-readline php7.3-xml psmisc 0 upgraded, 16 newly installed, 0 to remove and 49 not upgraded. Need to get 5573 kB of archives. After this operation, 23.3 MB of additional disk space will be used. Do you want to continue? [Y/n]
If you want to install a complete and functional LAMP server, you can visit our post:
How to install LAMP on Debian 10?
If you want to test if PHP is correctly installed, create a PHP file with the following content:
:~$ sudo nano /var/www/html/test.php <?php phpinfo(); ?>
Save the changes and close the file. Now, open your web browser and go to http://server-ip/test.php
or http://localhost/test.php
and you will see this:
So far so good.
3.- Getting Apache GUI on Debian 10
Now it’s time to install the Apache GUI. The first thing we have to do is download it from Github. However, it’s a good idea to create a folder dedicated to the program:
:~$ sudo mkdir /usr/local/apachegui/ ~$ cd /usr/local/apachegui/ :~$ sudo wget -c https://github.com/jrossi227/ApacheGUI/releases/download/v1.12.0/ApacheGUI-1.12.0.tar.gz
Next, decompress the file:
:~$ sudo tar -xvzf ApacheGUI-1.12.0.tar.gz
Once you have decompressed the file, navigate to the generated folder.
:~$ cd ApacheGUI/bin/
And finally start Apache GUI with the following command:
:~$ sudo ./run.sh Using CATALINA_BASE: /usr/local/apachegui/ApacheGUI/tomcat Using CATALINA_HOME: /usr/local/apachegui/ApacheGUI/tomcat Using CATALINA_TMPDIR: /usr/local/apachegui/ApacheGUI/tomcat/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/local/apachegui/ApacheGUI/tomcat/bin/bootstrap.jar:/usr/local/apachegui/ApacheGUI/tomcat/bin/tomcat-juli.jar Tomcat started.
4.- Using Apache GUI
Now open your favorite web browser and go to http://your-server:9999/ApacheGUI
. Remember that this port has to be available in the firewall. You will see this:
In the image above, you are asked how Apache is installed on your computer. Remember that we use the official Debian repositories, so leave the first option.
When you accept, you will see this other screen:
On this screen, you have to define the routes where Apache works. Do not worry, in the first field you have a list of distributions with everything predefined. Search for Debian and the fields will be automatically filled in.
On that same screen, you can define an administrator account with a password. It is recommended to do so.
Then, you will see the Login screen. Enter your newly created credentials.
Upon entering you will see the Apache GUI interface.
And you can, for example, check the virtualhost settings.
And that is it. Enjoy it.
Conclusion
Running a web server is a pretty important thing in a network. So we always welcome all the help we can find. In this sense the Apache GUI is a good alternative for configuring Apache.
Please share this post and join our Telegram Channel.
Hello!
After following your guidance for installation, I went to “http://my-server:9999/ApacheGUI” with browser, HTTP Error 500 occured ,with exception report as follows.
~~~~~
The server encountered an internal error that prevented it from fulfilling this request.
java.lang.IllegalMonitorStateException
java.base/java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryRelease(ReentrantReadWriteLock.java:372)
java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1302)
java.base/java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.unlock(ReentrantReadWriteLock.java:1147)
net.apachegui.locks.LockManager.unlockWrite(LockManager.java:181)
net.apachegui.db.JdbcConnection.closeConnection(JdbcConnection.java:99)
net.apachegui.db.SettingsDao.getAllSettings(SettingsDao.java:200)
net.apachegui.db.SettingsDao.(SettingsDao.java:28)
net.apachegui.db.SettingsDao.getInstance(SettingsDao.java:36)
net.apachegui.tomcat.ApacheGUIRealm.findSecurityConstraints(ApacheGUIRealm.java:13)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.base/java.lang.Thread.run(Thread.java:834)
Can you tell me what’s wrong with it ?
My server is on
Debian 10.4
Apache 2.4.38
PHP 7.3.11-1
Java openjdk 11.0.7
In addition, PHP test page could be displayed successfully.
Thanks!
I’m so sorry that I forgot telling important thing.
My server is Raspberry Pi 4B, OS is Debian 10.4 based Raspberry Pi OS (arm64bit ver)
I have the same error. Any solutions?
I left some instruction’s earlier for a new user using Linux forgot to include I was using Raspberry Pi 4 with Raspberry Pi OS Full (32 bit) equivalence Debian 10 Buster.
How can i install apapacheGui on raspberry pi 3 os 32 bit ?
Yes, it could work
Thanks for this very informative content. This will become a standard app on my development and production servers. angeloma, I owe you a few beers!
Thank you!
Your instructions worked to a tee. I had no issues installing ApacheGUI using these instructions, nothing needed correcting and I was able to use ApacheGUI to look into the web server and see exactly what is going on with it. I only use apache web server with mod_security3 to host subdomains being as my web hosting company flaked up their services somehow to where the modules I use do not work on them, so I host them myself. Thank you for these instructions. I hope this goes a long way!