Welcome! Log In Create A New Profile

Advanced

NGINX with Mac OS conf file

Posted by gmadeira 
NGINX with Mac OS conf file
May 16, 2014 09:42AM
Can anyone help please ?
I installed NGINX on mac os mavericks with passenger but when I try to stop/start nginx I get the following error:

Gabriels-Mac:gems gabrielmadeira$ sudo nginx -s stop
nginx: [emerg] invalid number of arguments in "root" directive in /usr/local/etc/nginx/nginx.conf:39

The conf file is:

#user gabrielmadeira;
worker_processes 1;



events {
worker_connections 1024;
}


http {
passenger_root /Users/gabrielmadeira/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/passenger-4.0.42;
passenger_ruby /Users/gabrielmadeira/.rvm/gems/ruby-2.1.0@filx/wrappers/ruby;

include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server_names_hash_bucket_size 64;
passenger_default_user gabrielmadeira;
passenger_default_group gabrielmadeira;
#
# server {
# listen 8080;
# server_name localhost;
#
# #charset koi8-r;
#
# #access_log logs/host.access.log main;
#
# location / {
# root html;
# index index.html index.htm;
# }
server {
listen 3000;
server_name rv.test.local;
location / {
root /Users/gabrielmadeira/Google Drive/Apps/Rep_Test/public;
passenger_app_env development;
passenger_enabled on;
}
}

server {
listen 80;
server_name rv.local;
location / {
root /Users/gabrielmadeira/Google Drive/Apps/Rep/public;
passenger_app_env staging;
passenger_enabled on;
}


#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}


# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}

}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}
}

What am I doing wrong ?
tks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 182
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready