Linux, Web Server & Database

Install Apache on VPS

Get Apache properly installed and configured on your VPS as your web server.

The Problem

You need Apache specifically (often because your application or hosting instructions assume it), but a default install doesn't have a virtual host for your domain, the right modules enabled, or sensible permissions set up.

About this problem

Apache remains the default choice for many PHP applications and scripts because of its widely-supported .htaccess override system, which lets individual directories control their own rewrite rules and access settings without touching the main server config.

It's commonly needed when migrating an application built with Apache-specific assumptions, or when following hosting instructions that assume cPanel-style Apache behaviour.

What's Included

What's NOT Included

How It Works

  1. Install Apache via the distro's package manager and enable required modules (rewrite, headers, ssl as needed).
  2. Create a virtual host file for your domain with AllowOverride All so .htaccess rules work where expected.
  3. Set ownership and permissions on the web root matching the Apache process user.
  4. Open the firewall for ports 80 and 443 and enable the site with a2ensite (Debian/Ubuntu) or equivalent.
  5. Test the configuration (apachectl configtest) and reload, confirming the domain serves correctly.

In practice: you buy the service, send over whatever access or details the job needs, I investigate and do the work, and you confirm it's resolved before we call it done.

Frequently Asked Questions

Why do I need mod_rewrite for my website?
mod_rewrite powers clean/pretty URLs used by WordPress, Laravel and most modern PHP frameworks — without it enabled, those URLs return 404 errors even though the files exist.
What does AllowOverride All actually do?
It tells Apache to respect .htaccess files in that directory, which is how most PHP applications configure their own rewrite rules and access restrictions without editing the main server config.
Why is my .htaccess file being ignored?
Almost always because AllowOverride is set to None for that directory in the virtual host — the .htaccess file itself is fine, Apache just isn't reading it.
Can I run Apache and PHP together on a VPS?
Yes, with either mod_php (Apache loads PHP directly) or PHP-FPM behind a proxy — mod_php is simpler to set up, PHP-FPM is generally more efficient for busier sites.
How do I know if Apache installed correctly?
systemctl status apache2 (or httpd on some distros) shows whether it's running, and visiting the server in a browser should show either your site or Apache's default test page.
Is Apache slower than Nginx?
Under heavy concurrent load Apache can use more memory per connection than Nginx, but for most small-to-medium sites the real-world difference is negligible compared to application-level performance.
Please note: the price shown applies to a standard case matching the description above. Every situation is different, and if your request falls outside the normal scope of this service, I will explain this before doing any additional chargeable work. I will never silently turn a small job into an expensive project.
Running into an issue with a service you've already bought, or unsure which one fits your problem? Message me directly on WhatsApp — no ticket system, no bot.