I used XAMPP on Windows 10 to test websites locally. After moving to Linux, I wasn't sure whether XAMPP was available or whether Apache could run on Linux at all. Should I install XAMPP for Linux, install Apache and the other components separately, or use something like Nginx, Docker, or Devilbox? I'd appreciate advice on a practical setup for local web development.
5 Answers
Apache runs perfectly well on Linux—in fact, Linux hosts a huge number of Apache installations. You can usually install Apache, PHP, MariaDB or MySQL, and any other tools directly from your distribution’s package manager. This gives you a more native setup than a bundled installer.
XAMPP is available for Linux, but it’s mainly a convenience bundle. Installing the individual components directly is usually cleaner and integrates better with the operating system. If you prefer a graphical start/stop control panel and minimal configuration, the Linux version of XAMPP is still a valid option.
For lightweight development, you can skip Docker and run the services directly. I use small scripts to start and stop Apache, the database, and other services only when I’m working, so they don’t consume resources all the time. Docker or a tool such as Devilbox can provide more isolated, reproducible environments, but it’s worth learning the basics of Docker before relying on it.
The simplest path is to install Apache directly from your Linux distribution’s repositories and add PHP and a database server as needed. There’s no technical limitation preventing Apache from running on Linux; the choice between Apache, Nginx, XAMPP, and containers mostly depends on how much automation and isolation you want.
Nginx is another good choice and is commonly used for modern web applications, but you don’t need to switch just because you’re on Linux. Apache is often simpler when following tutorials or working with projects that use .htaccess files.

That’s the main benefit of XAMPP: it handles much of the initial configuration and provides a simple on/off switch. It’s convenient if you don’t want to manage each service separately.