Installing Apache on openSUSE or SUSE Linux Enterprise Server (SLES) gives you a packaged HTTP server that already fits the platform's systemd and filesystem layout. A clean base install is the fastest way to verify that the daemon can answer requests locally before you move on to virtual hosts, reverse proxies, or TLS.
On current SUSE releases, the apache2 package provides the Apache HTTP Server service unit (apache2.service) and the default configuration tree under /etc/apache2. The packaged instance reads /etc/sysconfig/apache2 and falls back to /etc/apache2/httpd.conf unless APACHE_HTTPD_CONF points elsewhere, while the default DocumentRoot is /srv/www/htdocs and per-site virtual hosts are typically added under /etc/apache2/vhosts.d.
For this install pass, the main pitfalls are opening the wrong firewall zone, treating the common AH00558 ServerName warning as a hard syntax failure, or changing broad global configuration before the stock service has been proven to start. First get the package installed, confirm apachectl configtest reports Syntax OK, and open only the http service in the zone that actually faces your clients; add https later when you configure TLS.
$ sudo zypper refresh Retrieving repository 'Main Repository' metadata ...........................................[done] Retrieving repository 'Main Update Repository' metadata ....................................[done] All repositories have been refreshed.
$ sudo zypper install apache2 Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW package is going to be installed: apache2 1 new package to install.
$ sudo systemctl enable apache2.service Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service -> /usr/lib/systemd/system/apache2.service.
$ sudo systemctl start apache2.service
$ sudo apachectl configtest Syntax OK
If you see AH00558 together with Syntax OK, the service can still start; set a global ServerName later if you want to remove that warning.
$ sudo systemctl status apache2.service
* apache2.service - The Apache Webserver
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: disabled)
Active: active (running) since Thu 2026-04-09 14:20:11 +08; 3s ago
##### snipped #####
If the unit does not stay active (running), inspect journalctl -u apache2.service and /var/log/apache2/error_log before changing the configuration further.
$ curl -I http://127.0.0.1/ HTTP/1.1 200 OK Date: Thu, 09 Apr 2026 06:20:18 GMT Server: Apache Content-Type: text/html;charset=UTF-8
In a browser, http://localhost/ should show the packaged test page until you replace it with your own site content. The default DocumentRoot remains /srv/www/htdocs.
$ sudo firewall-cmd --zone=public --permanent --add-service=http success
Use the zone that is actually bound to the server's network interface. Opening the wrong zone can leave the service unreachable or expose it on an interface you did not intend.
These commands assume firewalld is managing the host firewall. If your server uses a different firewall workflow, allow TCP port 80 there instead.
$ sudo firewall-cmd --reload success
$ sudo firewall-cmd --zone=public --list-services cockpit dhcpv6-client http ssh
Add https only after you configure TLS for Apache.