From 6eac0f9131cfcbc0a8e2fdf1cfd14a9bf5624557 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 7 Aug 2014 14:40:01 -0600 Subject: [PATCH] Added web config files for IIS (web.config) & Nginx (nginx.conf) --- nginx.conf | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ web.config | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100755 nginx.conf create mode 100755 web.config diff --git a/nginx.conf b/nginx.conf new file mode 100755 index 000000000..e3e94f4c2 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,66 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 65; + + server { + listen 80; + server_name localhost; + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + + location / { + root html; + index index.php; + if (!-e $request_filename){ rewrite ^(.*)$ /index.php last; } + } + + location /user { + rewrite ^/user/accounts/(.*)$ /error redirect; + rewrite ^/user/config/(.*)$ /error redirect; + rewrite ^/user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$ /error redirect; + } + + location /cache { + rewrite ^/cache/(.*) /error redirect; + } + + location /bin { + rewrite ^/bin/(.*)$ /error redirect; + } + + location /system { + rewrite ^/system/(.*)$ /error redirect; + } + + location /vendor { + rewrite ^/vendor/(.*)$ /error redirect; + } + + # Remember to change 127.0.0.1:9000 to the Ip/port + # you configured php-cgi.exe to run from + + 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 $document_root$fastcgi_script_name; + include fastcgi_params; + } + + + } + +} diff --git a/web.config b/web.config new file mode 100755 index 000000000..8083c163f --- /dev/null +++ b/web.config @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +