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";
}
誰かが私を助けることができますか?ありがとう。
エラーは何ですか? –