Welcome! Log In Create A New Profile

Advanced

problem with .vhost config

Posted by svizzera 
problem with .vhost config
November 27, 2011 05:19AM
hey fellas,

I`m trying out nginx for the first time and its a bit tricky for me to get the .vhost config right for the webshop system I`m using.

Testwise I did setup a server with ngnix 1.0 and ispconfig 3
to test if the webshop system I`m using runs faster with nginx.
unfortunately I dont get the .vhost config right and nginix wont start up with this error:

Restarting nginx: nginx: [emerg] "location" directive is not allowed here in /etc/nginx/sites-enabled/100-snow2011.co.cc.vhost:81
nginx: configuration file /etc/nginx/nginx.conf test failed

my problem here is, that the exact line with the error in "location" section is not shown
and since there are so many "location" sections in the file, I cannot figure out which one mis producing the error.

I attached my .vhost test config file. I hope someone sees the error here as I really would like to use nginx instead of apache2.

Hostsystem is an ubuntu 11.10 server with nginx 1.0.5-1 and ispconfig 3.0.4.1



Edited 1 time(s). Last edit at 11/27/2011 05:28AM by svizzera.
Attachments:
open | download - 100-snow2011.co.cc.vhost (3.7 KB)
Re: problem with .vhost config
November 27, 2011 06:28AM
svizzera Wrote:
-------------------------------------------------------
> Restarting nginx: nginx: [emerg] "location"
> directive is not allowed here in
> /etc/nginx/sites-enabled/100-snow2011.co.cc.vhost:
> 81
> nginx: configuration file /etc/nginx/nginx.conf
> test failed

/etc/nginx/sites-enabled/100-snow2011.co.cc.vhost:81

81 is the line number.

Andrejs
Re: problem with .vhost config
November 27, 2011 04:11PM
discovered that too already but couldnt edit the post anymore

still dont know whats wrong with line 81

location ~ ^/(setup|admin)/?$ {
set $script_name /$1/index.php;
include fastcgi_params.oxid;
}

(line 81 is the first here)

any1?
Re: problem with .vhost config
November 27, 2011 11:05PM
I guess you got the server {} block accidently closed here:

>> set $script_name $fastcgi_script_name;
>> set $fcgi_php 127.0.0.1:9011;}
^^^
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
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