• Stars
    star
    303
  • Rank 132,438 (Top 3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Run Caddy with your NGINX config

Caddy NGINX Config Adapter

This is a config adapter for Caddy which converts NGINX config files into Caddy's native format.

This project is not complete, and we are asking the community to help finish its development. Due to resource constraints, we are unable to do all the development on our own at this time. However, we hope you will pick it up and collaborate on it together as a community. We'll be happy to coordinate efforts from the community. Start by opening issues and pull requests, then reviewing pull requests and testing changes!

Currently supported directives per context:

  • main:
    • http
  • http:
    • server
    • index
    • upstream
  • server:
    • listen
    • server_name
    • location
    • root
    • index
    • access_log
    • rewrite
    • if
  • if:
    • break
    • return
    • rewrite
    • set
  • upstream:
    • server
    • hash
    • ip_hash
    • keepalive
    • keepalive_requests
    • keepalive_timeout
    • ntlm
    • least_conn
    • random
  • location:
    • location
    • if
    • root
    • add_header
    • deny
    • allow
    • rewrite
    • fastcgi_pass
    • proxy_pass
    • expires
    • return
  • if (in location):
    • root
    • gzip
    • add_header
    • expires
    • proxy_pass

Thank you, and we hope you have fun with it!

Install

First, ensure your GOROOT and GOPATH environment variables are correct for your environment.

Then, follow the xcaddy install process here.

Then, build Caddy with this Go module plugged in. For example:

$ xcaddy build --with github.com/caddyserver/nginx-adapter

Use

Using this config adapter is the same as all the other config adapters.

You can also run Caddy directly with an nginx config using caddy run|start --config nginx.conf --adapter nginx (however, we do not recommend this until the config adapter is completed, since unfinished directives may just result in warnings and not errors).

Disclaimer

This project is not affiliated with F5 Networks or NGINX, Inc. NGINX is a registered trademark of NGINX, Inc.

More Repositories

1

caddy

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Go
53,678
star
2

certmagic

Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal
Go
4,768
star
3

examples

OBSOLETE. This repo was for Caddy v1. For v2 and newer, see our forum's wiki category.
CSS
968
star
4

xcaddy

Build Caddy with plugins
Go
748
star
5

forwardproxy

Forward proxy plugin for the Caddy web server
Go
570
star
6

ingress

WIP Caddy 2 ingress controller for Kubernetes
Go
558
star
7

caddy-docker

Source for the official Caddy v2 Docker Image
Dockerfile
378
star
8

cache-handler

Distributed HTTP caching module for Caddy
Go
211
star
9

website

The Caddy website
HTML
137
star
10

dist

Resources for packaging and distributing Caddy
Shell
109
star
11

dnsproviders

OBSOLETE: DNS providers adapted for use in Caddy to solve the ACME DNS challenge - for Caddy v1 only. See caddy-dns for v2.
Go
100
star
12

replace-response

Caddy module that performs replacements in response bodies
Go
84
star
13

vscode-caddyfile

Rich Caddyfile support for Visual Studio Code
TypeScript
68
star
14

transform-encoder

Log encoder module for custom log formats
Go
65
star
15

caddy-lua

An experiment in executing Lua from Caddy. Ignore this for now. ;)
Go
32
star
16

getcaddy.com

Automated installer script for Caddy with plugins. DECOMISSIONED in 2020.
Shell
22
star
17

sublimetext

Caddyfile syntax highlighting for Sublime Text 3
20
star
18

ntlm-transport

NTLM reverse proxy transport module for Caddy
Go
13
star
19

cue-adapter

CUE config adapter for Caddy
Go
11
star
20

pkl-adapter

Configure Caddy with Pkl format
Go
9
star
21

moduledoc

Automated JSON docs generation for Caddy modules
Go
7
star
22

zerossl

ZeroSSL REST API client implementation for Go
Go
5
star
23

ingress-docker

4
star
24

circuitbreaker

A circuit-breaker module for the reverse proxy
Go
4
star
25

json5-adapter

JSON5 config adapter
Go
3
star
26

jsonc-adapter

JSONC config adapter
Go
2
star