mirror of
				https://github.com/pierre42100/comunic
				synced 2025-11-04 12:14:10 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			769 B
		
	
	
	
		
			Caddyfile
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			769 B
		
	
	
	
		
			Caddyfile
		
	
	
	
	
	
:8080
 | 
						|
gzip
 | 
						|
fastcgi / 127.0.0.1:9000 php
 | 
						|
 | 
						|
# Begin - Security
 | 
						|
# deny all direct access for these folders
 | 
						|
rewrite {
 | 
						|
    r       /(.git|cache|bin|logs|backups|tests)/.*$
 | 
						|
    status  403
 | 
						|
}
 | 
						|
# deny running scripts inside core system folders
 | 
						|
rewrite {
 | 
						|
    r       /(system|vendor)/.*\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$
 | 
						|
    status  403
 | 
						|
}
 | 
						|
# deny running scripts inside user folder
 | 
						|
rewrite {
 | 
						|
    r       /user/.*\.(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$
 | 
						|
    status  403
 | 
						|
}
 | 
						|
# deny access to specific files in the root folder
 | 
						|
rewrite {
 | 
						|
    r       /(LICENSE.txt|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess)
 | 
						|
    status  403
 | 
						|
}
 | 
						|
## End - Security
 | 
						|
 | 
						|
# global rewrite should come last.
 | 
						|
rewrite {
 | 
						|
    to  {path} {path}/ /index.php?_url={uri}
 | 
						|
}
 |