DEV Community

Lucas Guimarães
Lucas Guimarães

Posted on

Is it possible to run ASP on linux with Apache? Yes, with AxonASP

Yes. And you don't need a Windows Server to do it.

If you maintain legacy Classic ASP systems, you know the infrastructure friction. You have modern applications running on Linux with Apache or Nginx, but that one legacy ASP system forces you to maintain a separate Windows/IIS environment.

AxonASP solves this natively. It is an open-source cross-platform server (created by Lucas Guimarães in Brazil and backed by over 10 active contributors from the World) designed specifically to process Classic ASP code directly on Linux. By configuring AxonASP FPM (FastCGI Process Manager) behind Apache, you can run legacy ASP alongside modern code on the exact same server.

This architecture provides distinct structural advantages. It allows shared hosting environments (like cPanel) to support ASP securely, because AxonASP FPM isolates each application into its own FastCGI pool running under specific Linux UIDs and GIDs.

Here is the exact technical deployment to get AxonASP FPM running with Apache on a Debian/Ubuntu system.

1. Install AxonASP

Download the Debian package directly from the release repository. This installs the binaries, the FPM manager, and the default configurations into /opt/axonasp.

wget https://github.com/guimaraeslucas/axonasp/releases/download/v2.3.18/axonasp_2.3.18_amd64.deb
sudo dpkg -i axonasp_2.3.18_amd64.deb
Enter fullscreen mode Exit fullscreen mode

2. Configure the FPM Pool

AxonASP FPM uses a manager-worker model. The manager runs as root and spawns worker processes for each application using the exact permissions specified in a pool configuration file.

Create a pool file for your application at /opt/axonasp/fpm/fpm.d/legacy-app.conf:

site_name = "legacy_billing"
uid = 1001
gid = 1001
socket = "/var/run/axonasp/legacy_billing.sock"
config_file = "/opt/axonasp/config/axonasp.toml"
app_path = "/var/www/legacy-app"
memory_limit_mb = 256
max_restarts = 5
tmp_dir = "/opt/axonasp/temp/"
Enter fullscreen mode Exit fullscreen mode

Note: Ensure the uid and gid match the user that owns /var/www/legacy-app. This strict isolation is what makes integration viable and secure with complete isolation.

Start and enable the FPM service:

sudo systemctl daemon-reload
sudo systemctl enable axonasp-fpm
sudo systemctl start axonasp-fpm
Enter fullscreen mode Exit fullscreen mode

3. Configure Apache FastCGI

Apache must proxy .asp requests to the Unix socket created by the FPM pool. Ensure the proxy and proxy_fcgi modules are enabled:

sudo a2enmod proxy proxy_fcgi
sudo systemctl restart apache2
Enter fullscreen mode Exit fullscreen mode

In your Apache VirtualHost configuration, route the requests using ProxyPassMatch. Apache will pass the necessary FastCGI environment variables (such as DOCUMENT_ROOT and SCRIPT_NAME) to AxonASP for accurate path resolution.

<VirtualHost *:80>
    ServerName legacy.example.com
    DocumentRoot /var/www/legacy-app

    <Directory /var/www/legacy-app>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    # Route .asp execution to the AxonASP FPM socket
    ProxyPassMatch ^/(.*\.asp(/.*)?)$ unix:/var/run/axonasp/legacy_billing.sock|fcgi://localhost/var/www/legacy-app/

</VirtualHost>
Enter fullscreen mode Exit fullscreen mode

Restart Apache:

sudo systemctl restart apache2
Enter fullscreen mode Exit fullscreen mode

System Architecture Benefits

Routing ASP execution through FastCGI yields direct operational returns:

  • Consolidated Infrastructure: Run legacy ASP and new APIs (Go, PHP) on the same Linux host, leveraging your existing Apache deployments.
  • Process Isolation: AxonASP-FPM drops privileges per pool. One application cannot access another's memory or files, fulfilling shared hosting security requirements.
  • Resource Control: FPM enforces memory ceilings via cgroups and automatically restarts crashed workers.

Stop rewriting functioning legacy code just to escape Windows. Move it to Linux, isolate it with FPM, and allocate your engineering hours to new features.

Top comments (0)