@@ -348,7 +348,7 @@ func (s *Scanner) scanSingleFile(filePath string) error {
348348 if strings .Contains (includePath , "*" ) {
349349 // If it's a relative path, make it absolute based on nginx config dir
350350 if ! filepath .IsAbs (includePath ) {
351- configDir := filepath .Dir (nginx .GetConfPath ("" , "" ))
351+ configDir := filepath .Dir (nginx .GetConfPath ())
352352 includePath = filepath .Join (configDir , includePath )
353353 }
354354
@@ -373,7 +373,7 @@ func (s *Scanner) scanSingleFile(filePath string) error {
373373 // Handle single file include
374374 // If it's a relative path, make it absolute based on nginx config dir
375375 if ! filepath .IsAbs (includePath ) {
376- configDir := filepath .Dir (nginx .GetConfPath ("" , "" ))
376+ configDir := filepath .Dir (nginx .GetConfPath ())
377377 includePath = filepath .Join (configDir , includePath )
378378 }
379379
@@ -413,7 +413,7 @@ func (s *Scanner) ScanAllConfigs() error {
413413 }()
414414
415415 // Get the main config file
416- mainConfigPath := nginx .GetConfPath ( "" , "nginx.conf" )
416+ mainConfigPath := nginx .GetConfEntryPath ( )
417417 err := s .scanSingleFile (mainConfigPath )
418418 if err != nil {
419419 logger .Error ("Failed to scan main config:" , err )
0 commit comments