0

Joomla がインストールされており、ユーザーが /media フォルダーから 1 つの PHP ファイルを実行できるようにする必要があります。どうやってするの?

現在の構成では、Nginx はこの PHP を実行せずにダウンロード用のファイルとして返します。これが私の設定の一部です:

location ~* /media {
   allow all;
   expires      1d;
}

location /media/dir/test.php {
   fastcgi_pass   unix:/var/run/php5-fpm.sock;
   include fastcgi_params;
   fastcgi_param       SCRIPT_FILENAME  $document_root$fastcgi_script_name;
}

location / {
   #PHP here works fine
   try_files $uri $uri/ /index.php?$args;
   # .. skipped ...
}
4

1 に答える 1