|
@@ -172,11 +172,12 @@ func apacheLogCapture(logfile string) {
|
|
var virtualHost string
|
|
var virtualHost string
|
|
vhost := logEntry.VirtualHost
|
|
vhost := logEntry.VirtualHost
|
|
if vhost != "" {
|
|
if vhost != "" {
|
|
- vhostAndPort := strings.Split(logEntry.VirtualHost, ":")
|
|
|
|
|
|
+ vhostAndPort := strings.Split(vhost, ":")
|
|
virtualHost = vhostAndPort[0]
|
|
virtualHost = vhostAndPort[0]
|
|
|
|
|
|
if config.UseVhostAsSource {
|
|
if config.UseVhostAsSource {
|
|
- virtualHost = virtualHost[0:strings.Index(virtualHost, ",")]
|
|
|
|
|
|
+ vhosts := strings.Split(vhost, ",")
|
|
|
|
+ virtualHost = strings.TrimSpace(vhosts[0])
|
|
vhIP := net.ParseIP(virtualHost)
|
|
vhIP := net.ParseIP(virtualHost)
|
|
if vhIP != nil {
|
|
if vhIP != nil {
|
|
remote = virtualHost
|
|
remote = virtualHost
|