2014-02-25 4 views
1

Baïkal 전용 호스트에 "일반 패키지"를 설치하려고합니다. 나는 웹 서버로 Nginx를 사용하고 있지만 실행시킬 수는 없다. 공식 docs은 서브 디렉토리 (http://mydomain.com/baikal) 대신 서브 도메인 (http://baikal.mydomain.com)에서 바이칼을 실행하기 위해 전용으로 사용됩니다. 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; 
} 
+0

해결책을 찾았습니까? – confile

+0

불행히도 : - \ – LongFlick

답변

0

꽤 이전 게시물하지만 난 바로 그 문제 ^^
는 간호원이 post에 대한을의에 대한 해결책을 찾고 여기에 리디렉션 된 이 문제와 가능한 해결책.
여기 는 Nginx에 대한 구성 (이 & 붙여 넣기를 절단, 내 작업하지 않습니다)입니다 :

location ^~ /baikal { # triggers location of baikal installation, and stop looking for other matches 
    index index.php; 
    charset utf-8; 

    # curiosity killed the cat 
    location ~ ^/baikal/(?:\.ht|Core|Specific) { 
    deny all; 
    } 

    # this corresponds to the recommended regex for matching php files 
    # and piping it to php-fpm 
    location ~ ^(.+\.php)(.*) { 
    try_files $fastcgi_script_name =404; 
    fastcgi_split_path_info ^(.+\.php)(.*)$; 
    fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 
    fastcgi_index index.php; 
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
    fastcgi_param PATH_INFO $fastcgi_path_info; 
    include fastcgi_params; 
    } 

    # case insensitive matching of static files for maximum caching time 
    location ~* \.(?:jpg|gif|ico|png|css|js|svg)$ { 
    expires max; add_header Cache-Control public; 
    } 
} 

내가 그래서 난 그것을 테스트 할 수있는 방법이 없었다 아파치를 사용하지만이 내가 사용의 시작점입니다 내 웹 서버의 문제를 해결할 수 있습니다.

2

같은 문제가 발생했습니다. this article에서 folowing 매우 간단 인스턴스 구성 나를 위해 큰 일 :

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; 
    } 
} 
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 

설치하는 데 문제가없는 것 같습니다.

관련 문제