diff --git a/nginx.template.conf b/nginx.template.conf new file mode 100644 index 0000000..997cfc1 --- /dev/null +++ b/nginx.template.conf @@ -0,0 +1,45 @@ +worker_processes 5; +daemon off; + +worker_rlimit_nofile 8192; + +events { + worker_connections 4096; # Default: 1024 +} + +http { + include $!{nginx}/conf/mime.types; + index index.html index.htm index.php; + + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] $status ' + '"$request" $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + access_log /dev/stdout; + error_log /dev/stdout; + sendfile on; + tcp_nopush on; + server_names_hash_bucket_size 128; # this seems to be required for some vhosts + + server { + listen 80; + server_name localhost; + index index.php index.html index.html; + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-Content-Type-Options "nosniff"; + charset utf-8; + root /app/public; + location / { + try_files $uri /index.php$is_args$args; + } + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + include $!{nginx}/conf/fastcgi_params; + include $!{nginx}/conf/fastcgi.conf; + } + } +} \ No newline at end of file