FREE ONLINE WEB SERVER CONVERTER

Nginx & Apache ➔ Caddyfile Converter

Convert supported Nginx server blocks and Apache .htaccess / VirtualHost directives to Caddyfile syntax in your browser. Review migration advisories and the generated configuration before deployment.

1-Click Presets:
Nginx (nginx.conf / server)
Generated Caddyfile

Migration Advisories & Optimisations

Paste or select a configuration above to see automated migration advisories and smart mappings.

Directives Eliminated / Handled Natively

  • None detected

Detected Features & Routing

  • None detected

Why Migrate from Nginx or Apache to Caddy?

Caddy provides directives for automatic HTTPS, reverse proxying, and PHP-FPM routing.

LOCAL

Automatic HTTPS

Caddy manages certificate issuance and renewal. Check its logs for issuance and renewal errors.

📄

Caddyfile syntax

Directives such as reverse_proxy and php_fastcgi group related server settings. Configuration length depends on the source configuration.

⚡

Built-In Reverse Proxy & PHP

WebSocket upgrades, X-Forwarded headers, and connection pooling are handled automatically. One clean php_fastcgi directive routes PHP apps securely.

TLS

Conversion in your browser

All parsing and transpilation run locally in your web browser. No server names, ports, IP addresses, or configs are ever transmitted or saved.

Directive mappings

FAST

Reverse Proxy & Headers

proxy_pass + 5 lines of proxy_set_header collapse to a single reverse_proxy. Host, X-Forwarded-For, and WebSockets are handled automatically.

proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
➔
reverse_proxy 127.0.0.1:3000
✨

Automatic HTTPS

ssl_certificate directives are stripped. Caddy automatically issues, renews, and configures TLS via Let's Encrypt / ZeroSSL.

ssl_certificate /etc/letsencrypt/...;
ssl_certificate_key /etc/letsencrypt/...;
➔
# Automatic HTTPS (Zero config)
⚡

PHP-FPM Router

try_files + fastcgi_pass and param scripts collapse into php_fastcgi and file_server.

try_files $uri $uri/ /index.php?$args;
fastcgi_pass unix:/run/php.sock;
➔
php_fastcgi unix//run/php.sock
file_server
SAFE

Clean Redirects

Supported RewriteRule patterns are converted to Caddy directives. Review warnings for rules that cannot be converted.

RewriteRule ^blog/(.*)$ /posts/$1 [R=301,L]
➔
redir /blog/* /posts/{1} permanent

Frequently Asked Questions

How do I convert an Nginx configuration to Caddyfile?

Paste your Nginx server block or location blocks into the input editor. The transpiler analyzes directives like proxy_pass, fastcgi_pass, try_files, root, and rewrite rules, and immediately generates an idiomatic Caddy v2 Caddyfile.

Can I convert Apache .htaccess and VirtualHost files?

Yes. Switch the server selector to Apache and paste your .htaccess directives or <VirtualHost> block. It translates RewriteRule, DirectoryIndex, header modifications, and basic auth into Caddy directives.

Is my server configuration uploaded or stored?

No. The entire conversion runs client-side in your browser via JavaScript. No configurations, domains, internal backend IPs, or server credentials are ever sent to any remote server.

What Nginx directives are omitted in Caddy?

Directives like ssl_certificate, ssl_protocols, proxy_set_header Upgrade, and gzip on are omitted because Caddy handles TLS management, WebSocket upgrading, and compression automatically by default.