Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Use libapache2-mod-fcgid instead of the missing libapache2-mod-fastcgi package when your application needs Apache’s fcgid-style handler. On current Debian releases, the old name is generally not published. Ubuntu 22.04 and 24.04 provide the replacement in the Universe component. For a modern PHP site, the better architecture is usually PHP-FPM behind Apache’s mod_proxy_fcgi, which connects to an already-running PHP service.
First identify your release, refresh APT metadata, and confirm which package is visible. Then choose the module based on whether Apache should manage generic FastCGI processes or proxy PHP requests to PHP-FPM.
What the error means
Messages such as Unable to locate package libapache2-mod-fastcgi, Package has no installation candidate, and libapache2-mod-fastcgi package not available usually describe a repository and package-name problem, not a broken Apache installation. A command copied from an older tutorial is requesting a legacy package name that is absent from the enabled repositories for your release.
Debian currently publishes libapache2-mod-fcgid; the stable package version is listed as 1:2.3.9-4. Debian describes it as “It is a binary-compatible alternative to Apache module mod_fastcgi.” Package catalogs list it for bullseye, bookworm, trixie, forky and sid. Ubuntu publishes the same package for 22.04 (Jammy) and 24.04 (Noble) in the Universe component.
#1 Best Overall
The replacement is not automatically the right choice for every application. Generic FastCGI or CGI software that expects Apache’s fcgid handler can use mod_fcgid. A PHP application normally belongs on PHP-FPM with mod_proxy_fcgi, where Apache forwards requests to an external PHP process.
Identify the release, architecture and repository state
Package availability is tied to the distribution release, architecture and enabled components. Run these checks before changing Apache configuration:
cat /etc/os-release
dpkg --print-architecture
sudo apt update
apt-cache policy libapache2-mod-fastcgi
apt search libapache2-mod-fcgid
Read the complete output from apt update. A disabled component, an unreachable mirror, an expired signature or a release that has reached end of life can leave APT with an incomplete index. The policy command should show no candidate for the legacy name on many current systems, while the search should list libapache2-mod-fcgid if the appropriate repository is enabled.
Rank #2
Interpret the results
- Old name has no candidate; replacement appears: the tutorial’s package name is obsolete for this release. Install the replacement only after selecting the architecture that fits your application.
- Neither name appears: APT metadata may be stale, the mirror may be unreachable, or the required repository component may be disabled.
- Ubuntu lists no fcgid package: check that Universe is enabled, run
sudo apt updateagain, and repeat the search. - APT reports a release or signature error: fix the repository configuration first. Do not bypass signature verification or install an untrusted binary.
Enable Universe on Ubuntu when necessary
On Ubuntu, libapache2-mod-fcgid is a Universe package. The exact repository-management command varies with the Ubuntu tooling and image, so use the supported method for your release to enable the Universe component. Afterward run:
sudo apt update
apt search libapache2-mod-fcgid
If the package still does not appear, inspect the files under /etc/apt/sources.list.d/ and your main APT sources for a line matching the installed Ubuntu release and containing universe. Do not add a source for a different release: mixing Jammy, Noble or Debian repositories can make dependency resolution and future upgrades unsafe.
Choose between mod_fcgid and PHP-FPM with mod_proxy_fcgi
The process owner and application type determine the correct architecture. Use this comparison before installing anything:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems| Option | Best fit | Who starts the application process | Migration considerations | Repository and maintenance notes |
|---|---|---|---|---|
libapache2-mod-fcgid (mod_fcgid) |
Existing generic FastCGI/CGI applications or configurations written for fcgid-style handlers | Apache creates and manages the application processes | Usually the smaller change when the application already uses fcgid directives; old mod_fastcgi directives may still need review |
Provided by current Debian releases and Ubuntu’s Universe component; update through APT |
PHP-FPM plus mod_proxy_fcgi |
Modern PHP applications | PHP-FPM runs as an external service; Apache only proxies requests | Requires an FPM pool, a matching Unix socket or TCP endpoint, and virtual-host handler changes | Keep Apache, PHP-FPM and FastCGI libraries on the distribution’s supported security updates |
Apache’s documentation states that mod_proxy_fcgi is available in Apache 2.3 and later and proxies to an external FastCGI service. Its key limitation is explicit: “Unlike mod_fcgid and mod_fastcgi, MOD_PROXY_FCGI has no provision for starting the application process.”
Install the maintained Apache module
When an fcgid-compatible handler is required
- Confirm that
apt search libapache2-mod-fcgidreturns a package for the installed release. - Install it from the configured distribution repositories:
sudo apt install libapache2-mod-fcgid - Enable the Apache module:
sudo a2enmod fcgid - Review each virtual host for directives that explicitly name
mod_fastcgior the oldfastcgi-scripthandler. Package installation does not rewrite incompatible application configuration.
Use this route when the software is a generic FastCGI application and Apache is expected to create and supervise its workers. If the site is PHP, do not select this solely because the old tutorial mentioned FastCGI; PHP-FPM is normally easier to maintain and isolate.
When the site is PHP
- Install the PHP-FPM package supplied for your distribution release. The package name and supported PHP version are release-specific; choose the version that your application supports rather than copying a socket path from an older guide.
- Enable the proxy modules Apache needs:
sudo a2enmod proxy proxy_fcgiEnable
setenvifas well if the example configuration supplied by your distribution requires it. - Start and enable the PHP-FPM service using the service name installed by your package. Verify that its pool configuration creates a Unix socket or listens on the expected TCP address.
- Update the PHP virtual host so requests ending in
.phpare passed to that endpoint. A common Unix-socket form is conceptually:<FilesMatch ".php$"> SetHandler "proxy:unix:/run/php/php-version-fpm.sock|fcgi://localhost/" </FilesMatch>The socket filename is illustrative. Inspect the active FPM pool configuration and use its actual path; it may include the PHP version and differ between Debian and Ubuntu releases.
- Remove or disable obsolete
mod_fastcgidirectives in the same virtual host. Leaving both handler schemes active can produce conflicts or send requests to a nonexistent backend.
Validate Apache before serving traffic
A successful APT transaction only proves that files were installed. Validate syntax, module loading and a real request in this order:
Rank #4
- Check the complete Apache configuration:
sudo apachectl configtestProceed only when the result is
Syntax OK. - Reload Apache so the selected module and virtual-host changes take effect:
sudo systemctl reload apache2 - Confirm which handlers are loaded:
apachectl -M | grep -E 'fcgid|proxy_fcgi|proxy' - Request a harmless test endpoint through the affected virtual host. Test the actual hostname and URL path, not only the default site, because Apache selects configuration by host and port.
- Watch the Apache error log while making the request:
sudo tail -f /var/log/apache2/error.logIf your installation routes logs to systemd, use the Apache unit’s journal instead.
For PHP-FPM, also inspect the FPM service log and confirm that the socket exists and is accessible to Apache. A test page that executes PHP confirms the complete path from the virtual host to the FPM worker; an HTTP response from Apache alone does not.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Diagnose common post-installation failures
HTTP 503 or “connection refused”
This normally means Apache cannot reach the FastCGI backend. Check that the PHP-FPM service is running, the configured socket or TCP address matches the pool, and the socket has not been removed after a package upgrade. Correct the endpoint in the virtual host, then reload Apache.
HTTP 403 or permission-denied messages
Verify filesystem traversal permissions on the document root and script directories, the ownership and mode of the socket, and any mandatory access-control policy enabled on the host. A module can be loaded correctly while Apache is still forbidden from reading or executing the application.
Best Value
Handler or directive errors during configtest
Search enabled sites and snippets for directives belonging to mod_fastcgi. They may not be recognized by mod_fcgid or mod_proxy_fcgi. Replace them with the handler syntax documented for the selected module instead of suppressing the error.
The old package appears in a tutorial but not in APT
Do not add a random third-party repository merely to obtain the historical name. Re-check the release and architecture, enable the supported component, and migrate to the maintained package or PHP-FPM architecture.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Security and lifecycle considerations
Downloading an old libapache2-mod-fastcgi Debian package from an arbitrary mirror bypasses the distribution’s dependency tracking and security updates. Ubuntu’s CVE-2025-23016 advisory records release-specific fixes for the related libfcgi component and identifies Ubuntu 20.04 as vulnerable in the affected context. Fixed versions differ by supported release, so apply the update offered by your release’s security repository rather than copying a version number from another system.
Keep Apache, PHP-FPM and FastCGI libraries supplied by Debian or Ubuntu repositories, and check the lifecycle of the operating-system release before investing in a legacy configuration. An end-of-life release may no longer receive fixes even if the package can still be installed from an old snapshot.
Quick Recap
A practical decision checklist
- Record the output of
cat /etc/os-releaseanddpkg --print-architecture. - Run
sudo apt updateand resolve mirror, signature or release errors. - Use
apt-cache policyfor the old name andapt searchforlibapache2-mod-fcgid. - On Ubuntu, confirm that Universe is enabled.
- Choose
mod_fcgidfor an existing generic fcgid-style application; choose PHP-FPM withmod_proxy_fcgifor PHP. - Inspect the installed FPM pool for the real socket or TCP endpoint instead of assuming an old path.
- Run
apachectl configtest, reload Apache, verify loaded modules, make a real request and inspect logs. - Remove obsolete
mod_fastcgidirectives and keep all components on supported security updates.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

