2016-07-12 14 views
1

Imウェブプログラミングで、私はいつも私のプロジェクトにXamppを使ってきました。私は今、麻のサーバを使いたいです。 私はlempサーバ(スタックWTServer)を配備しました。symfony用に設定されたdomain.confを定義しました。問題は、ルート・ディレクティブが機能しないことです。 同じコンテンツをlocalhost/domain.local/に表示しています。 サーバーの開始ページ(index.php)。Nginx domain.conf

これは私のdomain.confです:

server { 
server_name metaenlaceerp.local; 
root "c:/wtserver/www/metaenlaceerp"; 

## Access Restrictions 
allow  127.0.0.1; 
deny  all; 

location/{ 
    # try to serve file directly, fallback to app.php 
    try_files $uri /app.php$is_args$args; 
} 
# DEV 
# This rule should only be placed on your development environment 
# In production, don't include this and don't deploy app_dev.php or config.php 
location ~ ^/(app_dev|config)\.php(/|$) { 
    fastcgi_pass php_farm; 
    fastcgi_split_path_info ^(.+\.php)(/.*)$; 
    include nginx.fastcgi.conf; 
    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 
    fastcgi_param DOCUMENT_ROOT $realpath_root; 
} 
# PROD 
location ~ ^/app\.php(/|$) { 
fastcgi_pass php_farm; 
    #fastcgi_pass unix:/var/run/php5-fpm.sock; 
    fastcgi_split_path_info ^(.+\.php)(/.*)$; 
    include nginx.fastcgi.conf; 
    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 
    fastcgi_param DOCUMENT_ROOT $realpath_root; 
    # Prevents URIs that include the front controller. This will 404: 
    # http://domain.tld/app.php/some-path 
    # Remove the internal directive to allow URIs like this 
    internal; 
} 

# return 404 for all other php files not matching the front controller 
# this prevents access to other php files you don't want to be accessible. 
location ~ \.php$ { 
    return 404; 
} 

error_log "c:/wtserver/log/metaenlaceerp_error.log"; 
access_log "c:/wtserver/log/metaenlaceerp_access.log"; 
} 

誰かが私を助けることができますか?ありがとう。

+0

エラーは何ですか? –

答えて

0

投稿日:聴解127.0.0.1と動作します。