the work. That server could run suexec,
I suppose, or it could run everything under a separate user account.
Cheers,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
about it.
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On Tue, May 13, 2014 at 09:15:16PM +0200, B.R. wrote:
I understand the logic, but when using that handler through error_page 404
@404, won't the handler's 200 status overload the original 404 one?
http://nginx.org/r/error_page indicates that it won't unless = is used.
f
--
Francis
you include it in the mail?
That aside: what does the documentation for whatever directive you are
using say about the error message?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org
has, and why do you think that?
Compare $http_name and $sent_http_name in
http://nginx.org/en/docs/http/ngx_http_core_module.html#variables
with $upstream_http_... in
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables
and then use $upstream_http_x_host.
f
--
Francis
, it is not obvious to me what you are trying to do.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
expect the first option to happen if you are using variables
in your log file name, according to its documentation.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo
it should just work, without any complicated non-default
settings.
What specific problem are you seeing?
As in: what do you do; what do you see; what do you expect to see?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx
://nginx.org/r/access_log
Failing that, then -- untested! -- you might have luck if you duplicate
the try_files line inside the if block.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org
@php =404;
Answer #2: what do you think that directive does? What does the
documentation say that that directive does? Hint: the final argument to
try_files is uri or =code. All of the other ones are file.
f
--
Francis Dalyfran...@daoine.org
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
with the specified name sent by the upstream server in the “Set-Cookie”
response header field
is unclear or confusing?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman
{ return 301 $scheme://$http_host/dir1/; }
* or if there is exactly one host/port that you will always want to return
(e.g. server:8081), then you could
port_in_redirect off;
server_name_in_redirect on;
server_name server:8081;
But otherwise, I don't think it can be done.
f
--
Francis
get that http response but I expect this other http response?
Or: what do the nginx logs say about how the incoming request was handled?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http
.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
that it responds to http, not just
proxied-http.
Option (b) is probably less work. Look for either transparent or
reverse proxy within the squid documentation, and see if it is
appropriate for your setup.
f
--
Francis Dalyfran...@daoine.org
with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
,
(If not, then pay attention to the order of regexes.)
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
like
location ^~ /adminer/
After that, when you test, you can read the nginx logs to see exactly
why the 404 was produced.
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http
:
location = /index.html {
if ($http_referer ~* (www.)?amazon.com) {
return 301 /our-amazon-landing-page.html;
}
}
That doesn't scale much beyond one match; if you need that, use a map.
f
--
Francis Dalyfran...@daoine.org
likely there is no index.html file, or autoindex
(http://nginx.org/r/autoindex) is not on, is my guess.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
I have wrong?
You left out some useful information:
* what request do you make?
* what response do you get?
* what response do you want?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http
On Sat, Jun 07, 2014 at 05:05:46PM -0400, mfaridi wrote:
Francis Daly Wrote:
---
On Fri, Jun 06, 2014 at 11:57:22AM -0400, mfaridi wrote:
Hi there,
What does error_log say?
Most likely there is no index.html file, or autoindex
-path=/usr/local/sbin
--with-debug
./configure: error: invalid option --with-http_geo_module
./configure --help | grep geo
Some modules are default-excluded, and must be added with --with-;
some are default-included, and must be removed with --without-.
f
--
Francis Dalyfran
On Wed, Jun 11, 2014 at 06:20:50PM +0200, Luciano Mannucci wrote:
On Tue, 10 Jun 2014 22:43:05 +0100
Francis Daly fran...@daoine.org wrote:
Hi there,
The rest of the config?
:)
Well, I've posted it in my previous request for help. Beeing
longish I tried to spare some bandwith
://nginx.org/r/map)
to set a variable based on a cookie
(http://nginx.org/en/docs/http/ngx_http_core_module.html#variables),
and you can use a variable in your proxy_pass directive
(http://nginx.org/r/proxy_pass).
So it looks like it should Just Work.
f
--
Francis Dalyfran
/ contents.
http://nginx.org/r/location
for the details, and how to allow only /folder2 contents (by using two
separate location{}s).
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org
.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
filtering the module output to make it match what you want. I
guess that one of the embedded language might allow you to do that.
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
content to nginx. So
the full file also goes from upstream to nginx.
upstream never talks to client directly, in this topology.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman
request is for /. The only location block you have is a prefix
match for the four-character string $uri, which does not match
your request, so the request is processed by the default server-level
configuration.
f
--
Francis Dalyfran...@daoine.org
with /
}
http://nginx.org/r/location
So i want to redirect above uri values to different upstream server.
How can i do this?
Put the right config in the right location{}.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing
to upstream
What happened..?
nginx is apparently no longer able to talk to whatever upstream you
have configured.
Perhaps see if anything has happened to that?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http
to write the code, to make
things work as well there. (Presumably, if it were simple to get things
to work well, it would already have been done.)
Cheers,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http
due to if on the IfIsEvil page.
Cheers,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
server?
That line suggests that it will return exactly what you report it does
return.
It is not obvious to me what that line is intended to do. What happens
if you just remove it?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
searching for windows nginx.)
Cheers,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
-H Host:two.example.com http://localhost/
content of /tmp/www/two/index.html
$ curl -H Host:nil.example.com http://localhost/
which gives 404 Not Found, as expected.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx
here.)
You can see what nginx sends by looking in the debug log; or by watching
the traffic going from nginx to the fastcgi server. Or maybe your fastcgi
server has its own logging.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing
.
Two or three ifs might have been ok. One might have caused things not
to work as you wanted.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
care about.
and 2maxi.com/nil or what else gives 2maxi.com
That suggests that your browser can resolve 2maxi.com to the nginx server,
and hopefully it is clear from your configuration why the response was
what it was.
f
--
Francis Dalyfran...@daoine.org
://nginx.org/r/proxy_redirect
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
not to be one url.)
Alternatively, could you put all of your demo content below /demo?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
certificate fits whatever hostname the browser
requests. (Or configure the browser not to care about man-in-the-middle
attacks.)
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo
by
the browser when you test (you can check the nginx logs to see that).
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
not understand why with $http_ or $upstream_ does not work.
$http_ comes from the client, so should work.
$upstream_ is empty until after upstream has responded, which is too
late to be used in a cache key.
f
--
Francis Dalyfran...@daoine.org
= lostpassword) {
return 301 http://whatever$request_uri;
}
proxy_pass wherever;
}
should probably come close to what you want. You could test $args =
action=lostpassword if that better describes the requests that you want
to handle specially.
f
--
Francis Dalyfran
think should populate the
cache in the first place.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
/.
And do something similar for app2.
And then remove the final / in your proxy_pass directives.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
server or your
php runtime, rather than nginx.
I suggest searching for fastcgi prepend or php prepend in your
favourite search engine.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org
?
How can I use underscore symbol to separate variables?
In bash there is curly brackets style for such cases: ${x}_${y}_${z}.
May be nginx has something special for this too.
Yes. Curly brackets.
f
--
Francis Dalyfran...@daoine.org
(and applying to
all requests).
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
$ -- that will apply before your current location.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
some others like logo_5435_252gif or logo_25_1Xgif; and it
will not match logo_5435_252.GIF
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
so I tried to
remove them by adding proxy_hide_header.
That means that it won't be sent to the client, so the $sent_* variable
should be empty.
I want to remove the entries only for end users but I
want to access them inside my nginx.
Use the correct variable.
f
--
Francis Daly
by nginx.
Do you mean browser still talks to nginx on old-vm but I want it to
talk to something on new-vm, or nginx still talks to something on
old-vm but I want it to talk to something on new-vm, or something else?
f
--
Francis Dalyfran...@daoine.org
errors.)
# this, as the rest of the conf, is the same on both
If you diff conf1 conf2, do you see only and exactly the expected
changes from lines before this point?
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On Thu, Oct 16, 2014 at 07:40:17AM +0200, Sandra Snan wrote:
On Thu, 16 Oct 2014 00:02:11 +0100, Francis Daly fran...@daoine.org wrote:
Hi there,
Can you show the output of grep SCRIPT /etc/nginx/fastcgi_params
on the servers? (One output is fine, if the two are identical
with
autoindex on inherited from the server context.
If you want try_files to look for a directory instead of a file, you
have to configure it to do that.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http
in =405?
The rest is the details of what else try_files and alias do.
(try_files does see /test/test.html, but the serve-from-filesystem
handler does not try to serve that file.)
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
On Thu, Oct 23, 2014 at 02:00:44AM -0400, newnovice wrote:
Hi there,
can a map + regex be used to generate variables for -MM-DD-HH? I cant
use 'if' in the location i am trying this.
One map sets one variable.
Can you use your if outside all locations?
f
--
Francis Daly
that variable-in-log-file-name is not what you want.
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
is
designed to do what you want, so that you won't be fighting it.
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
want to use a different variable, the simplest
pure-config way would be to reverse proxy to another nginx server{},
including your variable in the X-Forwarded-For header, and do the normal
processing (including the deny/allow that you want) there.
f
--
Francis Dalyfran...@daoine.org
for me.
Are you sure that the test url that you are requesting matches this
location?
There may be more useful information in the debug log regarding what is
going wrong for you.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing
behaviour that you see.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
in ?param-name=([^]*).
But it might be less work to change the input to restrict itself to
nginx-friendly characters.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo
/nginx.conf:14
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
upstream must not include any part of the url.
You will probably better match nginx's idea of load-balancing if you
can use /Instance on each of three different host:port combinations.
f
--
Francis Daly
/apache-pass;
}
try_files /cache/$1.html.gz /cache/$1.html @apache;
}
could possibly work.
(At least until the config is changed in the future to add more if()s
in that location. So don't do that.)
f
--
Francis Dalyfran...@daoine.org
actually care about
requests like /js/file.js?)
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
, after you get the basic part working.
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
... permanent or return 301
(the processing stops and the redirect is returned to a client.)
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
.
That's a recipe for an infinite loop, as your browser reported.
What you probably want is:
listen on http; redirect everything to https.
listen on https; process requests normally.
which is most easily done with two separate server{} blocks.
f
--
Francis Dalyfran...@daoine.org
;
}
and reload, and see if that does what you want.
You may want to replace $server_name with $host or your preferred host
name directly, depending on what exactly you want.
But it should get over the infinite loop of your original config.
f
--
Francis Dalyfran...@daoine.org
doing the lightweight tasks,
so you see an increase in throughput.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
at the socket?
If not, are you running anything else which controls access to files? Do
logs for that give a hint?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
want to do.
If your apache system works well enough, do not change it. Maybe build
a test system on another machine, and play with changing that to nginx.
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx
On Tue, Nov 25, 2014 at 07:13:49PM +, Steve Wilson wrote:
On 24/11/2014 12:36, Francis Daly wrote:
On Mon, Nov 24, 2014 at 11:05:10AM +, Steve Wilson wrote:
Hi there,
Option 1: in all of the html that contains links that refer
to /dir/page.php?a=1b=2, url-encode it to be (at least
that elsewhere.
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
need to elaborate this further.
Use if to compare (bits of) $ssl_client_s_dn with the thing you want,
and act accordingly.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo
,
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
How can I use the {} syntax correctly?
This page seems to describe the nginx regular expression syntax
http://nginx.org/en/docs/http/server_names.html#regex_names
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx
to nginx contains
the Content-Type header with value application/json from the access log:
I don't see that header value in this access_log.
http://nginx.org/en/docs/http/ngx_http_core_module.html#variables
Good luck with it,
f
--
Francis Dalyfran...@daoine.org
about what
the location-matching engine is actually doing during a request.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
.
Note that, while this does work in a test system, it might be contrary
to the documentation at http://nginx.org/r/proxy_pass, so it may not
work forever. I think that the fact that the regex matches the complete
request uri probably means that it is ok, though.
f
--
Francis Daly
;
}
(Other possibilities exist.)
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
correctly.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
headers
You probably were not running with this configuration.
can it work?
With set at server{} level, yes.
All of the normal nginx configuration directive rules apply.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx
--compressed http://localhost/file.html
will get file.html.gz if it exists, with Content-Encoding: gzip;
or file.html if that exists, or 404.
Check the bytes sent field in your access_log to see which was
sent. Omit the --compressed in the curl command to see the difference.
--
Francis Daly
index.html
or
gzip -c index.html index.html.gz
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
?
What response do you get?
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On Thu, Feb 05, 2015 at 10:28:33PM +0200, peter petrov wrote:
Hi there,
Francis Daly I did what you suggested but it doesn't work. Access.log says
both times with --compressed or without it 200 162 for the nginx welcome
screen.It is very weird.
It works for me:
# ls -l html/index.html
On Tue, Jan 20, 2015 at 11:46:36AM +0100, Jan Algermissen wrote:
On 19 Jan 2015, at 21:38, Francis Daly fran...@daoine.org wrote:
Completely untested, but, depending on how you connect to upstream, does
proxy_hide_header or proxy_ignore_headers do what you want?
Do you have any idea, how
client address.
Check the varnish geoip module documentation.
f
--
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
a request for /history/one to be proxy_pass:ed
to http://example.com/folder/history/one, no?
location ^~ /history/, proxy_pass (http://nginx.org/r/proxy_pass),
and then you are responsible for fixing any links on the page if they
refer to folder at all.
Which part doesn't work?
f
--
Francis
201 - 300 of 1614 matches
Mail list logo