diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile
index b842f5d73b0650bc6ccfaa49da5b402d9f73b376..19519f8b8fb696be480fe816ff28b7e31a3771c0 100644
--- a/docker/nginx/Dockerfile
+++ b/docker/nginx/Dockerfile
@@ -1,5 +1,6 @@
 FROM gitlab-registry.in2p3.fr/cc-in2p3-devops/openshift-origin/openshift-images/nginx:stable-alpine
 LABEL maintainer="CNRS/CCIN2P3 DevOps Team"
 
-ADD php-build/symfony.conf /etc/nginx/conf.d/default.conf
+ADD php-build/symfony.conf /etc/nginx/conf.d/tms.conf
+RUN rm /etc/nginx/conf.d/default.conf
 ADD php-build/public /var/www/tms/public
diff --git a/docker/php-fpm/Dockerfile b/docker/php-fpm/Dockerfile
index 759817bc29bff901ffcf6bd752e897bf27ae422d..8082de039107794dd132047e1bb11aa7f0b7de85 100644
--- a/docker/php-fpm/Dockerfile
+++ b/docker/php-fpm/Dockerfile
@@ -5,5 +5,5 @@ RUN apk add --no-cache --virtual .php-build zlib-dev libpng-dev libjpeg-turbo-de
     && docker-php-ext-configure gd --with-freetype --with-jpeg \
     && docker-php-ext-install -j$(nproc) gd mysqli pdo pdo_mysql
 
-WORKDIR /var/www/html
-ADD php-build /var/www/html
+WORKDIR /var/www/tms
+ADD php-build /var/www/tms
diff --git a/tms/symfony.conf b/tms/symfony.conf
index ba5b9170eca75c2a1c3641ccc716050be8e9e82f..7cd6e72f62d528063aeec810bb6596b8de52cdf3 100644
--- a/tms/symfony.conf
+++ b/tms/symfony.conf
@@ -1,22 +1,27 @@
 server {
     listen 8081;
-    server_name  localhost;
-    index index.php index.html;
-    root /usr/share/nginx/html/tms;
+    root /var/www/tms/public;
+    index index.html index.htm index.php;
+    server_name  _;
+    charset utf-8;
+    location = /favicon.ico { log_not_found off; access_log off; }
+    location = /robots.txt  { log_not_found off; access_log off; }
 
-    # redirect server error pages to the static page /50x.html
-    error_page   500 502 503 504  /50x.html;
-    location = /50x.html {
-        root   /usr/share/nginx/html;
+    location / {
+        try_files $uri $uri/ /index.php$is_args$args;
     }
 
-    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-    #
-    location ~ /.*\.php$ {
-        fastcgi_pass   php-tms:9000;
-        fastcgi_index  index.php;
-        include fastcgi.conf; 
-        include        fastcgi_params;
+    location ~ \.php$ {
+        fastcgi_split_path_info ^(.+\.php)(/.+)$;
+        fastcgi_pass php-tms:9000;
+        fastcgi_index index.php;
+        include fastcgi_params;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     }
+
+    error_page 404 /index.php;
+
+    location ~ /\.ht {
+        deny all;
+    }
 }