trwnh / nginx-config-hacks Goto Github PK
View Code? Open in Web Editor NEWa personal repo of hacks i use to make nginx configs a tiny bit easier to manage
Home Page: http://sites.trwnh.com
License: The Unlicense
a personal repo of hacks i use to make nginx configs a tiny bit easier to manage
Home Page: http://sites.trwnh.com
License: The Unlicense
https://save.matbm.net/nsbwoasfiqbc.html?XJW5yw
I've had an issue where a PHP app was at the
/virtual
folder in my server. The fast_cgi was claiming "file not found".
fastcgi_param SCRIPT_FILENAME $document_root/virtual/$fastcgi_script_name;
solved the issue. Since the fast_cgi will search for scripts at the /virtual folder now.
Currently there is phpsub.conf
:
nginx-config-hacks/snippets/phpsub.conf
Lines 1 to 6 in 0ae23e7
and example subdirectory config:
nginx-config-hacks/sites/trwnh.com.conf
Lines 30 to 42 in 0ae23e7
maybe play around with this to see how modular it could be? just looking at it quickly it seems like the SCRIPT_FILENAME line can be moved out of phpsub.conf and the rewrite block could be eliminated entirely...
also with this config in particular, alias
directive may not even be necessary since the folder name and the uri path are the same. perhaps it could be eliminated as well, or a better example used (where the uri is different from the physical path on the system).
https://blog.martinfjordvald.com/2013/04/nginx-config-history-fastcgi_params-versus-fastcgi-conf/
i can't seem to find any downsides to just using $request_filename
100% of the time over $document_root$fastcgi_script_name
for SCRIPT_FILENAME
. $request_filename
just seems to be less likely to break -- it takes alias into account,
And if you use $request_filename, you should set index using index directive, fastcgi_index will not work.
which seems to be the only pitfall, per se.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.