Welcome! Log In Create A New Profile

Advanced

What's wrong with my config?

Posted by ashconnor 
What's wrong with my config?
September 15, 2011 01:43PM
Before now I had all my sites stuffed into a single configuration file which was starting to become somewhat bloated.I was hoping to separate out sites giving each one a single conf file.

To do this I removed each site block to it's own file, I then added the line include /opt/nginx/conf/sites-enabled/*.conf;

However when I try to reload I get the following error.

nginx: [emerg] invalid variable name in /opt/nginx/conf/nginx.conf:39

Here is the entire config file:

user ash;
worker_processes 5;

error_log logs/error.log;

pid logs/nginx.pid;

events
{
worker_connections 2048;
}

# Main server config

http {
include mime.types;
default_type application/octet-stream;

#Fusion Passenger Config
passenger_root /home/ash/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.8;
passenger_ruby /home/ash/.rvm/wrappers/ree-1.8.7-2011.03/ruby;
passenger_min_instances 2;
passenger_pool_idle_time 1200;
passenger_max_pool_size 10;

#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;
#tcp_nopush on;

sendfile on;
keepalive_timeout 65;
gzip on;

#Virtual Hosts

include /opt/nginx/conf/sites-enabled/*.conf;
}
Re: What's wrong with my config?
September 15, 2011 06:16PM
My best guess is that you need to move the include statement outside of the main server config block, so past the last curly bracket. Right now 'include' is being interpreted as applied to the main server config, which is probably not what you want.
Re: What's wrong with my config?
September 15, 2011 06:40PM
I figured it out.

There was an error in one of my included .conf files. However it was confusing to me because the error returned made me think there was something wrong with the main configuration file.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 129
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready