We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
package main
import ( "fmt" "log"
"github.com/tufanbarisyildirim/gonginx/parser"
)
func main() { p, err := parser.NewParser("/etc/nginx/nginx.conf", parser.WithIncludeParsing()) if err != nil { log.Fatalln("parser", err) }
c, err := p.Parse() if err != nil { log.Fatalln("parser2", err) } directives := c.FindDirectives("server") for _, block := range directives { for _, directive := range block.GetBlock().GetDirectives() { if directive.GetName() == "server_name" { fmt.Println(directive.GetName(), directive.GetParameters()) } } }
}
unknown directive 'text/html' on line 3, column 5
nginx.conf #... include /etc/nginx/mime.types; #...
mime.types
types { text/html html htm shtml; ....
The text was updated successfully, but these errors were encountered:
No branches or pull requests
package main
import (
"fmt"
"log"
)
func main() {
p, err := parser.NewParser("/etc/nginx/nginx.conf", parser.WithIncludeParsing())
if err != nil {
log.Fatalln("parser", err)
}
}
unknown directive 'text/html' on line 3, column 5
nginx.conf
#...
include /etc/nginx/mime.types;
#...
mime.types
types {
text/html html htm shtml;
....
The text was updated successfully, but these errors were encountered: