Skip to content

Is there a configuration for Caddy? #1004

Discussion options

You must be logged in to vote

I am a try and error programmer. :-)
This way I found out the following Caddyfile that runs on me:

:80 {
   php_fastcgi php:9000
	
   try_files {path} /index.html /yellow.php
    
   @notfound {
      not file
      not path_regexp blockDirs
    }
   rewrite @notfound /yellow.php

   @blockContent {
      path /content/*
   }
   rewrite @blockContent /home/error
    
   @blockSystem {
      path /system/*
   }
   rewrite @blockSystem /home/error
    
   file_server
   root * /usr/share/caddy/yellow
}

If someone has improved, I am grateful for it.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@gstrauss
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by simon-pipe
Comment options

You must be logged in to vote
1 reply
@simon-pipe
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants