From 84773cee803a7acdabca8efc6f03deb9eb9d7d27 Mon Sep 17 00:00:00 2001 From: Cyril L'Orphelin <cyril.lorphelin@cc.in2p3.fr> Date: Wed, 5 Feb 2020 14:46:30 +0100 Subject: [PATCH] MAJ add nginx --- tms/nginx.conf | 32 ++++++++++++++++++++++++++++++++ tms/symfony.conf | 25 +++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 tms/nginx.conf create mode 100644 tms/symfony.conf diff --git a/tms/nginx.conf b/tms/nginx.conf new file mode 100644 index 00000000..efafba53 --- /dev/null +++ b/tms/nginx.conf @@ -0,0 +1,32 @@ +user www-data; +worker_processes 4; +pid /run/nginx.pid; + +events { + worker_connections 2048; + multi_accept on; + use epoll; +} + +http { + server_tokens off; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 15; + types_hash_max_size 2048; + include /etc/nginx/mime.types; + default_type application/octet-stream; + access_log off; + error_log off; + gzip on; + gzip_disable "msie6"; + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; + open_file_cache max=100; + client_body_temp_path /tmp 1 2; + client_body_buffer_size 256k; + client_body_in_file_only off; +} + +daemon off; \ No newline at end of file diff --git a/tms/symfony.conf b/tms/symfony.conf new file mode 100644 index 00000000..70394422 --- /dev/null +++ b/tms/symfony.conf @@ -0,0 +1,25 @@ + +server { + server_name symfony.localhost; + root /var/www/html/tms/tms/public; + + + location / { + try_files $uri @rewriteapp; + } + + location @rewriteapp { + rewrite ^(.*)$ /index.php/$1 last; + } + + location ~ ^/index\.php(/|$) { + fastcgi_pass php-upstream; + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param HTTPS off; + } + + error_log /var/log/nginx/symfony_error.log; + access_log /var/log/nginx/symfony_access.log; +} \ No newline at end of file -- GitLab