2022年12月21日 星期三

nginx 變數與語法與範例

 # Map

http://shouce.jb51.net/nginx-doc/Text/3.18_map.html

https://www.astralweb.com.tw/how-to-set-map-on-nginx/


# 語法

https://blog.learn-or-die.com/zh-tw/nginx/

https://linuxhint.com/nginx-location-regex-examples/

# good

https://segmentfault.com/a/1190000013267839


# 認識 Header

CSP

https://medium.com/hannah-lin/content-security-policy-csp-%E5%B9%AB%E4%BD%A0%E7%B6%B2%E7%AB%99%E5%88%97%E7%99%BD%E5%90%8D%E5%96%AE%E5%90%A7-df38c990f63c


#Variable

https://www.javatpoint.com/nginx-variables

http://nginx.org/en/docs/varindex.html


#Log

https://www.digitalocean.com/community/tutorials/nginx-access-logs-error-logs



# Bug

# authentication 404 

https://nova.moe/grafana-basic-auth/

https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html#auth_basic


#nginx 與 php-fpm 運作介紹與設定

https://tec.xenby.com/20-nginx-%E8%88%87-php-fpm-%E9%81%8B%E4%BD%9C%E4%BB%8B%E7%B4%B9%E8%88%87%E8%A8%AD%E5%AE%9A%E8%AC%9B%E8%A7%A3


# 重導範例 1

rewrite ^/welcome $the_scheme://$the_host redirect;

location = / {
return 404;
}


# 加入 Header 在 proxy_pass 範例

location / {
add_header Access-Control-Allow-Origin *;
                proxy_pass http://drive-nextcloud/;
proxy_read_timeout 600;

                add_header X-server-header "test" always;
                add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
                add_header X-Download-Options       "noopen"        always;
        }

https://stackoverflow.com/questions/14501047/how-to-add-a-response-header-on-nginx-when-using-proxy-pass

# nginx 可以學習

https://ithelp.ithome.com.tw/articles/10241034

https://ithelp.ithome.com.tw/articles/10280441



沒有留言:

張貼留言