Quantcast
Channel: nginx - それマグで!
Browsing all 30 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

413 File too Largeになる。nginx+php-fpmの見落としがちな設定

nginx + php-fpmで構成するときに「アップロードサイズ」に注意する。php-fpm 側のphp.iniの設定でアップロード上限がある、nginx...

View Article


sslhでdohが捌けないのは dns-crypt 特定フラグのせいだった。nginx

SSLHで dohをさばけないdig DoHでDNS問い合わせがうまく行かないと思って4時間格闘した結果、DoHはdns-cryptなので、純粋なSNI/ALPNではないとわかった。まじかよ。それTLS特定フラグで識別可能じゃん。暗号化解除しなくても止められちゃうじゃん。色々調べると、DoHにはclient-magic of...

View Article


Image may be NSFW.
Clik here to view.

mattermost でファイルのアップロードができない。

ファイルアップロードで失敗するmattermostでファイルをアップロードしようとすると、アップロードで止まってしまう。{"create_post.fileProcessing":...

View Article

nginxでlua を使おうと思ったらdebianが楽

debianのnginxでluaを使ってたのでUbuntuで使おうと思ったらなかった。debianのnginx には luaがあった。どこで入れたんだっけ。nginx -V 確認したけどコンパイルでは入ってない。モジュールでは入ってる。apt-file show libnginx-mod-http-lua libnginx-mod-http-lua:...

View Article

Image may be NSFW.
Clik here to view.

nginx で lua を使う(nginx lua でハローワールド)便利なテクニックをご紹介!

nginx で luaを使うインストールと準備deiban の場合は次で一発で終わる。sudo apt install libnginx-mod-http-lua 最初に第一歩location ~ / { default_type'text/html'; content_by_lua "ngx.say('Hello, ngx_lua World!')"; }...

View Article


nginx で 内部リクエストを使ってコンテンツを書き換える。

nginx で 内部リクエストを使ってコンテンツを書き換える/user/xxxのときは、普通に見せて、/user/json/xxxのときは、JSONだけを返すような処理を nginxの前捌き(プロキシ)だけで実現したい。Location と 内部リクエストを使って、コンテンツを書き換える. location /a { default_type 'text/plain'; return 200...

View Article

nginx で単純に、リクエストPATHを返す

nginx で単純に、リクエストPATHを返す単純に、リクエストされたPATHを表示するだけのWEBアプリケーション(?)# vim: ft=nginx ts=2 sw=2 sts=2 server { server_name test.example.tld; listen 127.0.0.1:443 ssl; ssl_certificate_key...

View Article

nginx luaでリクエストのURL(PATH)を取得して、特定リクエストPATHのときだけレスポンスを書き換えたい。

nginx luaリクエストのURLを取得するlua側で特にすることはない。nginx側にある変数を参照するlocal url = ngx.var.scseheme .. ngx.var.server_name .. ngx.var.uri local u = string.format("%s://%s%s", ngx.var.scheme,...

View Article


nginx の proxy_redirectでlocationヘッダを書き換える

nginx の proxy_redirectを知りました。Locationを書き換えることができます。シンタックスproxy_redirect from to 実例proxy_redirect http://localhost:800 https://$server_name効果nginx...

View Article


Image may be NSFW.
Clik here to view.

nginx で WebDAVを有効にする。

nginx で WebDAVを有効にする。nginx の webdavの速度を試すのはありかも。...

View Article
Browsing all 30 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>