Macos 拒绝在Mac上的Nginx中连接

Macos 拒绝在Mac上的Nginx中连接,macos,magento,nginx,localhost,local,Macos,Magento,Nginx,Localhost,Local,我正在尝试在我的mac上安装Nginx。我使用的是8080端口。Nginx安装完成后,可以使用主Nginx页面 接下来,我尝试设置domainmagento.local(我正在安装magento 1)。问题是,按地址magento.local浏览器显示错误拒绝连接 下面是文件magento.conf: server { listen 8080; root /Users/denisdubinin/Sites/magento; index index.php; se

我正在尝试在我的mac上安装Nginx。我使用的是8080端口。Nginx安装完成后,可以使用主Nginx页面

接下来,我尝试设置domain
magento.local
(我正在安装magento 1)。问题是,按地址
magento.local
浏览器显示错误
拒绝连接

下面是文件
magento.conf

server {
 listen       8080;
 root    /Users/denisdubinin/Sites/magento;
 index     index.php;
 server_name  magento.local;
 location / {
   index index.html index.php;
   try_files $uri $uri/ @handler;
   expires 30d;
 }
 location ~ ^/(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
 location /var/export/ { internal; }
 location /. { return 404; }
 location @handler { rewrite / /index.php; }
 location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
 location ~* .php$ {
   if (!-e $request_filename) { rewrite / /index.php last; }
   expires off;
   fastcgi_pass 127.0.0.1:9000;
   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   fastcgi_param MAGE_RUN_CODE default;
   fastcgi_param MAGE_RUN_TYPE store;
   include fastcgi_params;
 }
}
在hosts文件中,我将
127.0.0.1 magento.local

在nginx日志文件中,我几乎什么也没有得到:

2017/01/16 18:27:06 [notice] 1111#0: signal process started

你能ping magento.local吗?我建议启用NGINX访问日志来跟踪请求。访问日志很好。当您使用localhost和magento.local访问magento时,可以在访问日志中看到请求吗?您可以ping magento.local吗?我建议启用NGINX访问日志来跟踪请求。访问日志很好。当您使用localhost和magento.local访问magento时,您会在访问日志中看到请求吗?