From first run to production architecture: everything you need to launch AxonASP with confidence.
axonasp.exe)Best for development and simple deployments. Built-in HTTP server on port 4050 by default.
axonaspcgi.exe)Best for production and high-traffic stacks with nginx/Apache/IIS integration.
git clone https://github.com/guimaraeslucas/axonasp.git
cd axonasp
go mod download
go run main.go
Open http://localhost:4050.
wget https://raw.githubusercontent.com/guimaraeslucas/axonasp/main/linux_install.sh -O linux_install.sh && sed -i 's/\r$//' linux_install.sh && chmod +x linux_install.sh && bash linux_install.sh
go build
# Windows full build helper
./build.ps1
# Windows
GOOS=windows GOARCH=amd64 go build
# Linux
GOOS=linux GOARCH=amd64 go build
# macOS Intel
GOOS=darwin GOARCH=amd64 go build
# macOS Apple Silicon
GOOS=darwin GOARCH=arm64 go build
go build -o axonaspcgi.exe ./axonaspcgi
./axonaspcgi -listen :9000 -root ./www
# Unix socket example
./axonaspcgi -listen unix:/var/run/axonasp.sock -root /var/www/asp
SERVER_PORT=4050
WEB_ROOT=./www
TIMEZONE=America/Sao_Paulo
DEFAULT_PAGE=index.asp,default.asp
SCRIPT_TIMEOUT=30
DEBUG_ASP=FALSE
| Variable | Default | Description |
|---|---|---|
SERVER_PORT |
4050 | HTTP server port |
WEB_ROOT |
./www | Root directory for ASP files |
TIMEZONE |
America/Sao_Paulo | Server timezone |
DEFAULT_PAGE |
index.asp,default.asp,... | Default page hierarchy |
SCRIPT_TIMEOUT |
30 | Script timeout (seconds) |
DEBUG_ASP |
FALSE | Detailed ASP stack traces |
CLEAN_SESSIONS |
TRUE | Cleanup expired sessions at startup |
ASP_CACHE_TYPE |
disk | AST cache type (memory/disk) |
ASP_CACHE_TTL_MINUTES |
0 | AST cache TTL |
AXONASP_VM |
FALSE | Experimental VM toggle |
VM_CACHE_TYPE |
disk | VM cache type |
VM_CACHE_TTL_MINUTES |
0 | VM cache TTL |
MEMORY_LIMIT_MB |
0 | Process memory limit |
ERROR_404_MODE |
DEFAULT | DEFAULT or IIS mode |
BLOCKED_EXTENSIONS |
see .env | Blocked extension list |
COM_PROVIDER |
auto | Access COM provider strategy |
SQL_TRACE |
FALSE | Verbose SQL logs |
SMTP_* |
- | SMTP configuration |
MYSQL_HOST |
localhost | G3DB MySQL host |
POSTGRES_HOST |
localhost | G3DB PostgreSQL host |
MSSQL_HOST |
localhost | G3DB SQL Server host |
SQLITE_PATH |
./database.db | G3DB SQLite path |
server {
listen 80;
server_name example.com;
root /var/www/asp;
location ~ \.(asp|aspx)$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
<VirtualHost *:80>
ServerName app1.example.com
ProxyPreserveHost On
ProxyPass / http://localhost:4050/
ProxyPassReverse / http://localhost:4050/
</VirtualHost>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyToAxonASP" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:4050/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
AxonASP reads web.config for IIS-style rewrite rules and custom error handling.
default: static errorpages/404.htmlasp: custom ASP page via CUSTOM_404_PAGEiis: httpErrors in web.config<rule name="Product Page" stopProcessing="true">
<match url="^product/([0-9]+)$" />
<action type="Rewrite" url="/product.asp?id={R:1}" />
</rule>
One application per instance (global.asa model). Run multiple instances for multiple apps:
# App 1
SERVER_PORT=4050 WEB_ROOT=./app1/www ./axonasp
# App 2
SERVER_PORT=4051 WEB_ROOT=./app2/www ./axonasp
# App 3
SERVER_PORT=4052 WEB_ROOT=./app3/www ./axonasp
DEBUG_ASP=TRUE
SQL_TRACE=TRUE
SERVER_PORT.DEBUG_ASP=TRUE.temp/session exists and is writable.DEBUG_ASP=FALSE.