Nginx domain.conf

Nginx domain.conf,nginx,config,symfony,Nginx,Config,Symfony,Im网络编程,我一直在我的项目中使用Xampp。我想现在就使用lemp服务器。 我已经部署了一个lemp服务器(stack WTServer),并定义了一个为Symfony配置的domain.conf。问题是root指令不起作用。 我在localhost/和domain.local/中观看相同的内容。 服务器中的欢迎页面(index.php) 这是my domain.conf: server { server_name metaenlaceerp.local; root "c:/wtserver

Im网络编程,我一直在我的项目中使用Xampp。我想现在就使用lemp服务器。 我已经部署了一个lemp服务器(stack WTServer),并定义了一个为Symfony配置的domain.conf。问题是root指令不起作用。 我在localhost/domain.local/中观看相同的内容。 服务器中的欢迎页面(index.php)

这是my 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";
}

有人能帮我吗?谢谢。

添加:收听127.0.0.1并起作用。

添加:收听127.0.0.1并起作用。

您遇到了什么错误?您遇到了什么错误?