Hi, and thanks for trying out Indigo 🙂
Regarding item 1: "Custom variables"...
Looks like you got very close! You provided a custom config at
/Users/username/Documents/Indigo/my first stack.indigostack/nginx_A4E8/conf/conf.d/custom_domain.localhost.conf
.
When the stack is started, Indigo will clone that file to
/Users/username/.indigo/stacks/930F8C/nginx_A4E8/conf/conf.d/custom_domain.localhost.conf
.
This is not quite the correct path — instead of conf/conf.d
you want to be overriding the config at conf/sites-enabled
. In your case the file in question is compiled by Indigo to:
/Users/username/.indigo/stacks/930F8C/nginx_A4E8/conf/sites-enabled/custom_domain.localhost.conf
,
so the override source file will need to be at:
/Users/username/Documents/Indigo/my first stack.indigostack/nginx_A4E8/conf/sites-enabled/custom_domain.localhost.conf
.
In the custom override file, your location block will look like:
location ~ \.php {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param ENVIRONMENT local;
fastcgi_pass {{php_server}};
# fastcgi_pass unix:/var/run/php7-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
Regarding your updated comment above, you're right 🙂 Overriding templates/generic.php.conf
will affect every nginx site you define in that stack. This may actually be a good choice in your circumstance? It simply depends on whether you would like the fastcgi_param ENVIRONMENT local
config in every site, or just one specifically.
Regarding item 2: "Add Custom re-write rules"...
As with item 1, the file that needs this config is at:
/Users/username/.indigo/stacks/930F8C/nginx_A4E8/conf/sites-enabled/custom_domain.localhost.conf
.
This can be overridden by a file at:
/Users/username/Documents/Indigo/my first stack.indigostack/nginx_A4E8/conf/sites-enabled/custom_domain.localhost.conf
.
I assume you were following the Advanced Configuration documentation. Can you suggest anything I could improve there as it feels like the docs have let you down a little in this case.
Let us know how you get on!