May I ask what does
include VALET_HOME_PATH/Nginx/*;
do exactly in nginx.conf or how should I use it right for any custom nginx configurations?
It auto-loads all the files in your ~/.valet/Nginx/ folder, into your nginx http config.
So, you "could" put files in there (not ending in .dev) if you wanted to add http-suitable configs there.
They wouldn't be domain-specific though (since those are all inside your .dev files.)
But the ~/.valet folder is somewhat volatile, subject to alteration by valet install activities.
Instead you could put your http customizations into the /usr/local/etc/nginx/servers/ folder, which is read after all the *.dev directives are read.
How can I enable the directory listing output. I'm trying to create a nginx.conf on /usr/local/etc/nginx/servers/ with directive
location / {
autoindex on;
}
but doesn't work
I suspect yours is an issue of "priority", where one rule is superceding another.
Thanks for your reply, can you guide me how to do it?
@Inter95 nginx entry point is /usr/local/etc/nginx/nginx.conf if you open this file you will see several includes at the bottom:
include /Users/<user>/.valet/Nginx/*;
include servers/*;
include valet/valet.conf;
In my case I found the parameter I was trying to set in nginx.conf.default was being overridden in valet/valet.conf.
Check there and also any configuration files in your servers folder.
@bossrabbit Thanks for your reply, I tried your suggestion but didn't work. I'm using this commit 8039d7c doesn't work exactly like "autoindex on;" but do the work
Most helpful comment
It auto-loads all the files in your ~/.valet/Nginx/ folder, into your nginx
httpconfig.So, you "could" put files in there (not ending in
.dev) if you wanted to addhttp-suitable configs there.They wouldn't be domain-specific though (since those are all inside your
.devfiles.)But the
~/.valetfolder is somewhat volatile, subject to alteration byvalet installactivities.Instead you could put your
httpcustomizations into the/usr/local/etc/nginx/servers/folder, which is read after all the *.dev directives are read.