1

「通常のパッケージ」を使用して、専用ホストにバイカルをインストールしようとしました。Web サーバーとして Nginx を使用していますが、実行できません。公式ドキュメントは、サブディレクトリ ( http://mydomain.com/baikal ) ではなく、サブドメイン ( http://baikal.mydomain.com )で Baikal を実行することのみを目的としています。http://mydomain.com/baikal/card.php/addressbooks/IstMe/default/を開くと、「ファイルが見つかりません」というメッセージしか表示されません。どんな助けでも大歓迎です。

私のnginx.confは次のようになります:

location /baikal {
    alias /usr/share/webapps/baikal/html;
    index index.php;
    rewrite ^/.well-known/caldav /cal.php redirect;
    rewrite ^/.well-known/carddav /card.php redirect;

    location ~ ^/baikal/(.+\.php)$ {
        alias /usr/share/webapps/baikal/html/$1;
        fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include fastcgi.conf;
    }
}

location ~* /baikal/(\.ht|Core|Specific) {
    deny  all;
    return 404;
}
4

3 に答える 3

2

私は同じ問題を抱えていました。この記事の次の非常に単純なインスタンス構成は、私にとってはうまくいきました。

server {
    listen       [::]:443 ssl;
    server_name  yourdomain.tld;

    root  /usr/share/nginx/baikal/html;
    index index.php;

    ssl_certificate      server.crt;
    ssl_certificate_key  server.key;

    ssl_session_timeout  5m;

    ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers   on;

    rewrite ^/.well-known/caldav /cal.php redirect;
    rewrite ^/.well-known/carddav /card.php redirect;

    charset utf-8;

    location ~ /(\.ht|Core|Specific) {
        deny all;
        return 404;
    }

    location ~ ^(.+\.php)(.*)$ {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include        fastcgi_params;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}
于 2015-05-08T08:14:23.337 に答える
0

そのようなルートからhtmlディレクトリへの2つのシンボリックリンクを作成しようとしましたか:

cd /var/www/baikal
sudo ln -s  html/card.php card.php
sudo ln -s  html/cal.php cal.php

その結果が得られるはずです:

ls -lah /var/www/baikal
total 72K
drwxrwxr-x  6 www-data www-data 4,0K nov.  19 12:40 .
drwxr-xr-x 25 www-data www-data 4,0K nov.  19 12:54 ..
lrwxrwxrwx  1 root     root       12 nov.  19 12:40 cal.php -> html/cal.php
lrwxrwxrwx  1 root     root       13 nov.  19 12:40 card.php -> html/card.php

これは私のインストールではうまくいくようです。

于 2016-11-19T11:46:21.303 に答える