0
0

nginx でユーザーディレクトリから PHP スクリプト

Last updated at Posted at 2023-10-05

Raspberry Pi 3 で apache の代わりに nginx を動かしている。

ネットからいくつかの情報 (Github gist, Stack Exchange) を集めたが、どうもうまくいかない。ユーザーディレクトリの location ブロックには正しく入り、php ファイルの存在も確認できるが、実行すると 404 ばかり。

追記:
スクリプトの存在をチェックする行をコンフィグに追加したら、なぜか上手く行った。

if(-f $document_root/$2) {
    #ここには何も入れなくていい
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0