From b0ca01b2ec524a77b006a6934c23bd0a03683bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 19 Aug 2017 23:11:31 +0200 Subject: [PATCH] add missing file --- source/installation/nginx.conf | 71 ++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 source/installation/nginx.conf diff --git a/source/installation/nginx.conf b/source/installation/nginx.conf new file mode 100644 index 000000000..bdc99fca0 --- /dev/null +++ b/source/installation/nginx.conf @@ -0,0 +1,71 @@ +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + error_log /var/log/nginx/error.log; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + gzip off; + + #include /etc/nginx/conf.d/*.conf; + +upstream phpfcgi { + server fpm:9000; + # server unix:/var/run/php5-fpm.sock; #for PHP-FPM running on UNIX socket +} + +server { + listen 80; + + #server_name symfony2; + root /var/www/chill/web; + + error_log /var/log/nginx/symfony2.error.log; + access_log /var/log/nginx/symfony2.access.log; + + # strip app.php/ prefix if it is present + rewrite ^/app\.php/?(.*)$ /$1 permanent; + + location / { + index app.php; + try_files $uri @rewriteapp; + } + + location @rewriteapp { + rewrite ^(.*)$ /app.php/$1 last; + } + + # pass the PHP scripts to FastCGI server from upstream phpfcgi + location ~ ^/(app|app_dev|config)\.php(/|$) { + fastcgi_pass phpfcgi; + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param HTTPS off; + } +} +} +