Mais conteúdo relacionado Nginx & php fpm - the webserver you might actually like - php usergroup berlin5. WORKING FOR
gives science back to the people who make it happen.
We help researchers build reputation and accelerate scientific
progress.
On their terms.
11. NGINX CONF BASICS
/t/gn/gn.of
ecnixnixcn
ue nix
sr gn;
wre_rcse 4
okrpoess ;
wre_p_fiiy00 01 00 10;
okrcuafnt 01 00 10 00
errlg /a/o/gn/ro.o wr;
ro_o vrlgnixerrlg an
pd
i /a/u/gn.i;
vrrnnixpd
eet {
vns
wre_oncin
okrcnetos 12;
04
}
12. NGINX CONF BASICS
/t/gn/gn.of
ecnixnixcn
ht {
tp
icue
nld /t/gn/ietps
ecnixmm.ye;
dfuttp apiainottsra;
eal_ye plcto/ce-tem
acs_o /a/o/gn/ceslg mi;
ceslg vrlgnixacs.o an
snfl
edie o;
n
keaietmot 6;
eplv_ieu 5
icue/t/gn/ofd*cn;
nld ecnixcn./.of
}
15. FANCY STATIC CONTENT
Isd Sre Bok
nie evr lcs
lcto ~^/j|m|s|onod)/{
oain (sigcsdwlas
}
lcto ~(scspggfjgpf${
oain .j|s|n|i|p|d)
}
17. DENY ACCESS TO ALL .DOT-FILES
Isd Sre Bok
nie evr lcs
lcto ~/.{
oain
acs_o of
ceslg f;
lgntfudof
o_o_on f;
dn al
ey l;
}
18. SSL
sre {
evr
sre_ae_
evrnm ;
lse 43
itn 4;
slo;
s n
}
Or just
sre {
evr
lse 43dfutsre sl
itn 4 eal_evr s;
}
19. SSL - CONFIG
slcriiae
s_etfct wlcr.r;
idadct
slcriiaeky
s_etfct_e wlcr.e;
idadky
slssintmot 5;
s_eso_ieu m
slssinccesae:S:0;
s_eso_ah hrdSL1m
slpooosSL3TS1TS11TS12
s_rtcl Sv Lv Lv. Lv.;
slpee_evrcpeso;
s_rfrsre_ihr n
slcpesEDERAAS5-H34AS5-H26R4HG:M5!NL:EH!E
s_ihr CH-S-E26SA8:E26SA5:C:IH!D:aUL!D:A
SC;
GM
sled_uv sc511
s_chcre ep2r;
20. ERROR PAGES
errpg 5051525354/0.tl
ro_ae 0 0 0 0 0 50hm;
lcto /0.tl{
oain 50hm
itra;
nenl
}
STARTUP BONUS:
sre {
evr
sre_ae*etiTigi;
evrnm nxBghn.o
lcto /0 {
oain 50
rtr 50
eun 0;
}
}
21. REWRITES
HTTPS ALL THE THINGS
sre {
evr
sre_ae _
evrnm ;
lse
itn 8;
0
rwie^hts/$otrqetuipraet
ert tp:/hs$eus_r emnn;
}
OLDSCHOOL
rwie ^ues(+$ /hwue=1
ert /sr/.) so?sr$? ls;
at
22. AUTH
lcto /{
oain
at_ai "etitd;
uhbsc Rsrce"
at_ai_srfl /t/gn/ofdmAphpsw;
uhbscue_ie ecnixcn./yp.tasd
}
24. LOAD BALANCING LEGACY
usra wbwres{
ptem e_okr
i_ah
phs;
sre ww.xml.o;
evr w1eapecm
sre ww.xml.o;
evr w2eapecm
sre ww.xml.o;
evr w3eapecm
}
25. PROXY
lcto /{
oain
poyps
rx_as ht:/oahs:00
tp/lclot88;
poysthae
rx_e_edr XRa-P $eoead;
-elI rmt_dr
poycce
rx_ah zn;
oe
/Dfut
/eal:
poycceky$ceepoyhs$r$sag$rs
rx_ah_e shm$rx_otuii_rsag;
}
28. PROCESS MANAGEMENT FOR THE MASSES
Think: "supervisord"; But without caring
sd atgtisalpp-p
uo p-e ntl h5fm
/t/h5fmppfmcn
ecpp/p/h-p.of
/ Dntrsattewbevr rsatpp:
/ o' etr h esre, etr h )
sd sriepp-p rsat
uo evc h5fm etr
29. FPM-CONFIG
[yp]
mAp
lse =90
itn 00
;itnalwdcins=17001
lse.loe_let 2...
ue =pp
sr h
gop=pp
ru h
rqettriaetmot=1
eus_emnt_ieu 0
rqetsolgtmot=1
eus_lwo_ieu
solg=/a/o/h-p/yp-lwlg
lwo vrlgppfmmApso.o
30. FPM-CONFIG - PROCESS MANAGEMENT
p =dnmc
m yai
p.a_hlrn=5
mmxcide 0
p.tr_evr =5
msatsres
p.i_pr_evr =5
mmnsaesres
p.a_pr_evr =3
mmxsaesres 5
31. NGINX + PHP
lcto /{
oain
fscips
atg_as 1700.:00
2..1190;
fsciidx
atg_ne idxpp
ne.h;
fsciprm
atg_aa SRP_IEAE$ouetro/ne.h;
CITFLNM dcmn_otidxpp
icue
nld fsciprm;
atg_aas
}
32. APPLICATION SERVERS!
lcto /{
oain
fscips
atg_as aoteSre:00
nnhrevr90;
fsciidx
atg_ne idxpp
ne.h;
fsciprm
atg_aa SRP_IEAE$ouetro/ne.h;
CITFLNM dcmn_otidxpp
icue
nld fsciprm;
atg_aas
}
33. SCALING!
lcto /{
oain
fscips
atg_as wres
okr;
fsciidx
atg_ne idxpp
ne.h;
fsciprm
atg_aa SRP_IEAE$ouetro/ne.h;
CITFLNM dcmn_otidxpp
icue
nld fsciprm;
atg_aas
}
usra wres{
ptem okr
sre
evr Ap:00
p190;
sre
evr Ap:00
p290;
sre
evr 12181.:00
9.6.0390;
}