diff --git a/tests/automatic/settings/nginx.conf.tpl b/tests/automatic/settings/nginx.conf.tpl
index 3b7a2b66da1b0d39de1f05b40de6ac67e91705b5..e688e587b4bba79b28d1de7a1bee87fa2e957bb7 100644
--- a/tests/automatic/settings/nginx.conf.tpl
+++ b/tests/automatic/settings/nginx.conf.tpl
@@ -1,4 +1,5 @@
 worker_processes  1;
+daemon off;
 
 events {
     worker_connections  1024;
@@ -13,12 +14,10 @@ http {
 
 #    keepalive_timeout  0;
 #    keepalive_timeout  65;
-    access_log  off;
-    error_log off;
 
     resolver 127.0.0.1:8600 valid=1s;
     server {
-        listen       8400;
+        listen       {{ env "NOMAD_PORT_nginx" }};
           set $discovery_endpoint discovery.service.asapo;
           location /discovery/ {
             rewrite ^/discovery(/.*) $1 break;