Something Strange Re-Iterate
Rajeev J Sebastian
rajeev.sebastian at gmail.com
Wed Jan 28 17:47:48 MSK 2009
On Wed, Jan 28, 2009 at 8:05 PM, Shamunda <shamunda at playlan.com> wrote:
> Hello
>
> Seeing as I didn't get a response from my last question. Let me a different
> approach.
>
> I followed an example config from this site:
> http://topfunky.net/svn/shovel/nginx/conf/nginx.conf
>
> Everything for the most part was clear except the part of the example that
> states this:
>
> # Copy this section on down and put into a separate file
> # if you want to organize your virtual hosts in files.
> #
> # Then include here with
> #
> # include /usr/local/nginx/conf/vhosts/my_subdomain.conf
> #
> # the server directive is nginx's virtual host directive.
>
> This part of the instruction wasn't really clear as to where to put the
> 'include' statement. It says to copy everything, then include here?!?! I
> have no idea what that means.
>
> So inevitably I ended making my main nginx.conf look like this
>
> http {
> .
> .
> .
> # Rename to mongrel_site1, mongrel_site2, etc if using
> # virtual hosts.
> upstream mongrel {
> server 127.0.0.1:5000;
> # server 127.0.0.1:5001;
> # server 127.0.0.1:5002;
> }
>
> /usr/local/nginx/conf/vhosts/my_subdomain.conf
> .
> .
> .
> }
>
> Then I created a file called 'my_subdomain.cong' (in the path of course), as
> a test just to see if it works with part of the example that say "copy from
> here down".
>
> So my first question is; Is the above correct, or, am i supposed to put the
> 'include' within the upstream method?
>
> Example:
>
> upstream mongrel {
> server 127.0.0.1:5000;
> # server 127.0.0.1:5001;
> # server 127.0.0.1:5002;
> /usr/local/nginx/conf/vhosts/my_subdomain.conf
> }
I think you forgot the "include" keyword.
Try
> upstream mongrel {
> server 127.0.0.1:5000;
> # server 127.0.0.1:5001;
> # server 127.0.0.1:5002;
> include /usr/local/nginx/conf/vhosts/my_subdomain.conf
> }
More information about the nginx
mailing list