Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: change root

$
0
0
I can't change the root path of my nginx.conf file.

I have installed nginx on mac os with passenger using home-brew. But its impossible to change the root path of my rails app. Nginx keeps saying:

nginx: [emerg] invalid number of arguments in "root" directive in /opt/nginx/conf/nginx.conf:46

the nginx.conf file is:

#user nobody;

worker_processes 1;

#error_log logs/error.log;

#error_log logs/error.log notice;

#error_log logs/error.log info;

#pid logs/nginx.pid;

events {

worker_connections 1024;

}

http {

passenger_root /Users/gabrielmadeira/.rvm/gems/ruby-2.1.0@global/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;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '

# '$status $body_bytes_sent "$http_referer" '

# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;

#tcp_nopush on;

#keepalive_timeout 0;

keepalive_timeout 65;

#gzip on;

server {

listen 80;

server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {

root /Users/gabrielmadeira/Google Drive/Apps/Rep/public;

index index.html index.htm;

passenger_enabled on;

rails_env development;

}

#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

#

}

}

Can anyone help please ?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>