Using Apache

If you're receiving SSL traffic on apache, configure a new virtual host. Your original port would now be used to terminate SSL and forward traffic to the new virtual host. We can now mirror traffic from the new Virtual Host using goreplay.

If unencrypted traffic is being received, directly use goreplay.

Use the example below to create a new virtual host on NEW_NON_SSL_PORT, which you can use to mirror traffic to HyperTest.

Old Apache Config:
Listen OLD_SSL_PORT

<VirtualHost *:OLD_SSL_PORT>
    ## ssl related config ##
    ProxyPreserveHost On

    ProxyPass / http://localhost:OLD_APP_PORT>
    ProxyPassReverse / http://localhost:OLD_APP_PORT>
</VirtualHost>
New Apache Config:
Listen OLD_SSL_PORT
Listen NEW_NON_SSL_PORT

<VirtualHost *:OLD_SSL_PORT>
    ## ssl related config ##
    ProxyPreserveHost On

    ProxyPass / http://localhost:NEW_NON_SSL_PORT>
    ProxyPassReverse / http://localhost:NEW_NON_SSL_PORT>
</VirtualHost>

<VirtualHost *:NEW_NON_SSL_PORT>
    ProxyPreserveHost On

    ProxyPass / http://localhost:OLD_APP_PORT>
    ProxyPassReverse / http://localhost:OLD_APP_PORT>

</VirtualHost>

To Verify the mirroring setup, hit any api on the application and check for request in "last mirrored requests" section or Session page in HyperTest.

Last updated