ホームページと文書を異なる場所で実行しようとしていますが、nginx-configを正しく設定する方法がわかりません。NginxをNextcloud/Website /書類作業と併用する
私の作業ツリーが次のようになります。
の/ var/www /の
| - >ウェブサイト
| - > nextcloud
| - >事務処理
私のホームページが到達可能ですweb.domain.comを通じて、私のNextcloud istはcloud.domain.comで到達可能です。 私は、web.domain.com/notesの下でPaperworkを手に入れたいと思っています。 文書ワークのindex.phpは、サブフォルダ "paperwork/frontend/public"にあります。
これは、(全体のSSLとクラウド一部なし)これを解決するために私attempです:
server{
listen 443 ssl http2;
server_name web.domain.com;
error_log /var/log/nginx/debug.log debug;
root /var/www/website;
location/{
index index.php index.html;
}
location /notes {
alias /var/www/paperwork/frontend/public;
index index.php index.html index.htm;
try_files $uri $uri/index.php;
}
location ~ /(nextcloud|backups) {
deny all;
return 403;
}
location ^~ /nextcloud/ {
deny all;
return 402;
}
location ^~ /nextcloud/ {
deny all;
return 402;
}
location ~ \.php$ {
try_files $uri =404;
alias /var/www/paperwork/frontend/public;
index index.php index.html index.htm;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
}
}
彼は間違ったディレクトリを使用しているので、私は別のソリューション多くのことを試してみたが、私はeather 404を取得し、 /var/www/notes/index.php(またはそれに類似したエラー)が見つからないか、nginxがindex.phpをファイルとしてダウンロードしてくれています。
Thxで事前に!
ちょうどそれとその動作を試してみました。あなたはすごいです.XX! –