[Seaside] WAFileLibrary deployFiles then what?

Jupiter Jones jupiter.jones at mail.com
Sat Nov 24 10:56:24 UTC 2018


Hi Timothy,

Maybe I’m late to the party here, but this is how I deal with it. The following is a dedicated seaside application server so the location is simply “/“ 

My FileLibrary deployFiles end up at the path /opt/git/projectName/www_root/files

I also added the the limits which seem to help keep things working when I get a heap of requests trying to break things or test for php things.

The end result is that file library resources are served from the image unless deployed, and then they are served by Nginx.

The key is the try_files directive that looks for files in the file system and if that fails passes it to the backend. Seems to work well.

Maybe there’s something here that will help.

Cheers,

J


# Seaside NGINX  Configuration
server_tokens off;
limit_req_zone $binary_remote_addr zone=seasideRequestLimit:10m rate=30r/m;
limit_conn_zone $binary_remote_addr zone=seasideConnectionLimit:10m;

upstream gsDevKit_seaside_fastcgi {
	least_conn;
	server localhost:13301;
	server localhost:13302;
	server localhost:13303;
}

server {
	listen 80;
	root /opt/git/projectName/www_root;
	client_max_body_size 10M;
	client_body_timeout 5s;
	client_header_timeout 5s;
	
	server_name projectname.com.au;

	location @gsDevKit {
		limit_req zone=seasideRequestLimit;
		limit_conn seasideConnectionLimit 10;
		
		include /usr/local/etc/nginx/fastcgi_params;
		fastcgi_pass gsDevKit_seaside_fastcgi;
	}
	
	location /config {
		allow 10.0.0.1/24;
		allow 192.168.0.1/24;
		deny all;
	}
		
	location / {
		try_files $uri $uri/ @gsDevKit;
	}

#	if ($uri = /) {
#		rewrite ^(.*)$ /ProjectName$1 break;
#	}
}






More information about the seaside mailing list