404 in combination with file_server
danielschneider opened this issue · 1 comments
danielschneider commented
When I'm using cgi together with file_server, i'm getting a 404 on cgi calls.
Im using the following Caddyfile
{
order cgi last
http_port 8081
}
localhost:8082 {
root * D:\Mobile
file_server browse
cgi cgi-bin/cgiip.exe D:\Mobile\cgi-bin\cgiip.exe {
script_name cgi-bin/cgiip.exe/
}
}
Without the file_server section, cgi seems to be working fine. But no static content is delivered. :( My website is not working :(
With the file file_server section included, i'm getting a 404 on all cgi calls. The file_server tries to deliver the cgi-call as a file. My website is also not working :(
My website contains static content and in addition cgi calls to a third party software.
Any help appreciated. Is it a bug, or am I using it in a wrong way?
danielschneider commented
Sorry, solved it on my own. Of course, it was a configuration issue.
I needed to add the following snippet to my configuration
@blockit {
not path /cgi-bin/*
}
file_server @blockit browse