Struggling with the behavior of the log options in httpd.conf on 5.6-stable. 

I'm trying to get different virtual domains to log to their own files but no
matter what option I've tried after reading the man page I get odd results. 

Using the configuration below, ALL access gets logged to the default access.log,
even the ones from the other servers listed. In the specific domain-access.log
files I get only the errors and nothing in the domain-error.log files. 

Can anyone look at the config below and help me understand why it might be
logging that way and how to fix it? 

Cheers, 

-Clint 


#
# Macros
#
ext_addr="egress"
include "/etc/nginx/mime.types"

# A minimal default server
server "default" {
        listen on $ext_addr port 80
        directory { no index, index "index.html", index "index.php" }

   log style combined

        location "*.php" {
        fastcgi socket "/tmp/php-fpm.sock"
        }

}

server "www.domain1.com" {
        listen on $ext_addr port 80
        directory { no index, index "index.html", index "index.php" }
   root "/domain1.com/htdocs"

        log style combined
   log { access "domain1.com-access.log", error "domain1.com-error.log" }

        location "*.php" { fastcgi socket "/tmp/php-fpm.sock" } 
}

server "domain1.com" {
        listen on $ext_addr port 80
        directory { no index, index "index.html", index "index.php" }
   root "/domain1.com/htdocs"

   log style combined
   log { access "domain1.com-access.log", error "domain1.com-error.log" }

        location "*.php" { fastcgi socket "/tmp/php-fpm.sock" }

}

server "www.domain2.com" {
        listen on $ext_addr port 80
        directory { no index, index "index.html", index "index.php" }
   root "/domain2.com/htdocs"
        
   log style combined
   log { access "domain2.com-access.log", error "domain2.com-error.log" }
        
        location "*.php" { fastcgi socket "/tmp/php-fpm.sock" }

}

Reply via email to