...
 
......@@ -27,7 +27,7 @@ services:
- app
- redis
ports:
- "127.0.0.1:8082:80"
- "127.0.0.1:[available port, e.g. 8080]:80"
volumes:
- ./nginx:/etc/nginx/conf.d
- ./nginx/cache:/var/cache/nginx
......
# this is for silverstripe
server {
listen 80;
root /var/www/html;
......@@ -16,58 +15,35 @@ server {
sendfile on;
try_files $uri =404;
}
location ~ /framework/.*(main|rpc|tiny_mce_gzip)\.php$ {
fastcgi_keep_conn on;
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /(mysite|framework|cms)/.*\.(php|php3|php4|php5|phtml|inc)$ {
deny all;
}
location ~ /\.. {
deny all;
}
location ~ \.ss$ {
satisfy any;
allow 127.0.0.1;
deny all;
}
location ~ web\.config$ {
deny all;
}
location ~ \.ya?ml$ {
deny all;
}
location ^~ /vendor/ {
deny all;
}
location ~* /silverstripe-cache/ {
deny all;
}
location ~* composer\.(json|lock)$ {
deny all;
}
location ~* /(cms|framework)/silverstripe_version$ {
deny all;
}
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
location ~ /(mysite|framework|cms)/.*\.(php|php3|php4|php5|phtml|inc)$ { deny all; }
location ~ /\.. { deny all; }
# location ~ \.ss$ {
# satisfy any;
# allow 127.0.0.1;
# deny all;
# }
location ~ web\.config$ { deny all; }
location ~ \.ya?ml$ { deny all; }
location ^~ /vendor/ { deny all; }
location ~* /silverstripe-cache/ { deny all; }
location ~* composer\.(json|lock)$ { deny all; }
location ~* /(cms|framework)/silverstripe_version$ { deny all; }
location ~ \.php$ {
fastcgi_keep_conn on;
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
}