I have installed Nginx 1.2.0 with Passenger on my Mac Mini running Lion Server. I used the instructions from the link below.
https://github.com/coverall/nginx
I will state upfront that I am new to Nginx & Passenger. I am working on a Ruby on Rails project that I would like to host on the server. When I try to start Nginx I get the following error:
[emerg] unknown directive "upload_pass" in /usr/local/etc/nginx/virtualhosts/adam.localhost.coverallcrew.com.conf:20
Here are lines 19 & 20 from the file in question. This is a file that I assume was included in the Nginx installation. The only config file I have done anything with is nginx.conf where I added the lines to hopefully host my Rails application.
# pass request body to here
upload_pass @fast_upload_endpoint;
This is my second attempt at doing extensive web searches on how to correct this error. I had hoped to find if I needed to add something to nginx.conf or something to get upload_pass defined somewhere but only found solutions where the directive was indeed missing.
I took a look at nginx.conf. There are a lot of statements commented out. Here are the ones that are not:
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;
}
}
Another question: Do I need these virtual hosts that were including in the Nginx install?
Any help would be appreciated.
It appears your Nginx is not compiled with the upload_pass module so it does not understand that directive. I am not certain how to do this with homebrew, but you can compile it in:
./configure --add-module=/path/to/upload_pass/source