我在运行Lion Server的Mac Mini上安装了带有Passenger的Nginx 1.2.0。我使用了以下链接中的说明。NGINX [emerg]配置文件中的未知指令“upload_pass”错误
https://github.com/coverall/nginx
我会说明前期,我是新来的Nginx &乘客。我正在开发一个我想在服务器上托管的Ruby on Rails项目。当我尝试启动Nginx的我得到以下错误:
[emerg] unknown directive "upload_pass" in /usr/local/etc/nginx/virtualhosts/adam.localhost.coverallcrew.com.conf:20
这里是线19 & 20从有问题的文件。这是一个我假设包含在Nginx安装中的文件。我所做的任何配置文件都是nginx.conf,我在其中添加了希望托管我的Rails应用程序的行。
# pass request body to here
upload_pass @fast_upload_endpoint;
这是我第二次尝试做大量的网络搜索,如何纠正这个错误。我曾希望能够找到是否需要向nginx.conf中添加某些内容,以便在某处定义upload_pass,但仅在找到指示确实缺失的解决方案时才找到解决方案。
我看了一下nginx.conf。有很多声明被注释掉了。这里是那些不是:
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
gzip on;
server_name_in_redirect off;
port_in_redirect off;
client_max_body_size 8m;
client_body_buffer_size 128k;
include upstreams/*.conf;
include virtualhosts/*.conf;
include third-party/*.conf;
server {
listen 8080;
server_name www.lightbesandbox2.com;
root /Sites/iktusnetlive_ror/public;
passenger_enabled on;
}
}
另一个问题:我需要这些虚拟主机,包括在Nginx的安装?
任何帮助,将不胜感激。
我最后有其他问题与Nginx的。我决定删除这个安装,并安装另一个版本的Nginx,但没有包含在这里的链接中的所有铃声和哨音。到目前为止,我已经能够让Nginx&Passenger在没有任何错误的情况下启动。感谢您的输入。如果我再次遇到这个问题,我会保存你的答案。 –