Welcome! Log In Create A New Profile

Advanced

Re: GEOIP context problem

Maxim Dounin
August 31, 2010 11:56AM
Hello!

On Tue, Aug 31, 2010 at 11:38:38AM -0400, syle wrote:

> Actually I'll post one of my server directives so we can see if there is
> any inheritance problems like
> you suggested, i have about 50 server directives the same as this:
> ( I know it seems quite bloated but I didn't read any way I could set
> php and perl/cgi scripts outside of
> server directivesfor all the vhosts)
>
>
> server {
> listen 80;#bind to ipv4
> listen [::]:80; #bind to ipv6
> server_name x.x.x;
> root /xxx/xxx/xxx;
> access_log /usr/nginx_logs/xxx_xxx_log main;
> error_log /usr/nginx_logs/xxx_xxx_error;
> index index.php index.pl index.html;
> error_page 404 /xxx/xxx.pl;
> error_page 500 502 503 504 /xxx/xxx.pl;
> location ~ \.php$ {
> fastcgi_index index.php;
> fastcgi_pass unix:/tmp/cgi2.sock;
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> include fastcgi_params;
> }
> location ~ \.pl$ {
> fastcgi_pass unix:/tmp/cgi.sock;
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> include fastcgi_params;
> }
> }
>
> ---- i do see params being set in location as you said would not work,
> So are you saying i would have to add all those GEO_IP directives to all
> 50 server directives :( perhaps maybe can suggest a way to move these
> perl and php directives outside server directives into http context to
> work with GEOIP? or I have to hope for a freebsd commit to stop removing
> that file I suppose.

As long as all fastcgi_param's are identical in all locations -
you are free to move all of them to http level.

Alternatively - nothing stops you from using another include file
for these params.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

GEOIP context problem

syle August 31, 2010 12:18AM

Re: GEOIP context problem

Sergey A. Osokin August 31, 2010 03:42AM

Re: GEOIP context problem

Maxim Dounin August 31, 2010 05:42AM

Re: GEOIP context problem

syle August 31, 2010 10:58AM

Re: GEOIP context problem

syle August 31, 2010 11:38AM

Re: GEOIP context problem

Maxim Dounin August 31, 2010 11:46AM

Re: GEOIP context problem

Maxim Dounin August 31, 2010 11:56AM

Re: GEOIP context problem

syle August 31, 2010 10:25PM

Re: GEOIP context problem

syle August 31, 2010 10:43PM

Re: GEOIP context problem

adamchal October 21, 2010 05:50PM

Re: GEOIP context problem

Sergey A. Osokin September 01, 2010 02:06AM



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