2017-04-14 6 views
0

私はMacの複数のサイトのための強壮剤とnginxを設定しようとします。 私のnginxは私のMacでlocalhostとして動作します。macの複数のサイトでnginx confのtonic restのために

私のルートは、/ユーザ/トルステン/サイトiは、例えばいくつかのプロジェクトをhabeルートで

です/ project1に、/のProject2

各プロジェクトは、強壮、残りのフォルダ/標準/残りを持っている...

nginx.confで、私は何が起こったん

location /rest/ { 
     fastcgi_pass_header Authorization;   # Pass the http authorization parameter to the PHP script 
     if (!-e $request_filename) { 
       rewrite ^/(.*)$ /rest/dispatch.php?/$1 last; 
       break; 
     } 
    } 

を試してみてください。 各プロジェクトに設定が必要ですか、すべてのプロジェクトに対してグローバル設定が可能ですか? $ project/rest/...?

答えて

0

この設定は私

location ~ ^/(?<project>.+)/standard/rest/ { 
    fastcgi_pass_header Authorization; 
    include /usr/local/etc/nginx/conf.d/php-fpm; 

    if (!-e $request_filename) { 
      rewrite ^/(.*)$ /$project/standard/rest/dispatch.php?/$1 last; 
      break; 
    } 
} 
のために働きます
関連する問題