N00b: Forwarding the full request to upstream server

2018-02-04 Thread Joel Parker
I have a situation where I receive a request like: http://device.healthcheck.com/ready I want this to be sent to a server upstream but keep the full request intact. For example: server { resolver 8.8.8.8; listen 80; location / {

Re: curl connection refused

2017-12-18 Thread Joel Parker
Yeah, it was a network issue. tcpdump helped. Thanks > On Dec 18, 2017, at 1:39 PM, Francis Daly <fran...@daoine.org> wrote: > > On Mon, Dec 18, 2017 at 01:31:57PM -0600, Joel Parker wrote: > > Hi there, > >> network connectivity, firewall, etc. are all

Re: curl connection refused

2017-12-18 Thread Joel Parker
ran...@daoine.org> wrote: > On Mon, Dec 18, 2017 at 01:21:41PM -0600, Joel Parker wrote: > > Hi there, > > > I have seen this a lot on google but have not been able to find a > suitable > > solution. My firewall is setup correctly. > > This looks like something that ngin

curl connection refused

2017-12-18 Thread Joel Parker
I have seen this a lot on google but have not been able to find a suitable solution. My firewall is setup correctly. I am listening on port 80 netstat -anltp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program

NGINX lifecycle

2017-11-09 Thread Joel Parker
I want to load a table of key/value pairs from the file system when nginx starts and not every time a request comes in. I am going to use the key/value pairs to compare against incoming post args in my location block. My question is how many times is init_by_lua_block called ? or is there

Conditional $uri and html from file

2017-11-07 Thread Joel Parker
I am using lua to parse out the username of the posted form and if the username == user and password == password. I want to change the URI to http://www.somesite.com//forum/unauthorized.html otherwise, I want it just to do: proxy_pass http://$http_host$uri$is_args$args;

[emerg] unknown directive "rewrite_by_lua_file" in /usr/local/nginx

2017-10-25 Thread Joel Parker
I have configured nginx-1.9.2 to evaluate a third party module and configure the source like this: ./configure --add-module=../ngx_http_proxy_connect_module-master/ --add-module=../lua-5.1.4/ --with-http_ssl_module After compiling the version shows what I configured: # nginx -V nginx version:

Re: no modules found after compiling

2017-05-30 Thread Joel Parker
how can I compile them as external modules (shared objects) ? Joel Parker On Tue, May 30, 2017 at 10:22 AM, Maxim Dounin <mdou...@mdounin.ru> wrote: > Hello! > > On Tue, May 30, 2017 at 10:14:32AM -0500, Joel Parker wrote: > > > I am running centos7 and am compiling th

Modules folder not created

2017-05-30 Thread Joel Parker
I am running centos7 and am compiling the lua module and the ndk http module. Everything seems to be configured correctly but after I do a make and make install, the modules directory doesn't exist and there are no sign of the shared libraries : ndk_http_module.so ngx_http_ula_module.so Here is

Logging requests / responses in multiple files

2017-04-27 Thread Joel Parker
I wanted to see if there was a way to log a request and response in separate file, so that I end up with something like this: request_1.log response_1.log request_2.log response_2.log request_3.log response_3.log .. Is there a way to do this ? Joel

Re: N00b - confused ssl

2017-04-26 Thread Joel Parker
So it sounds like if I want to decrypt incoming traffic and upstream traffic I would put them in the same block like this ? server { ## # This is acting like the server side to decrypt the incoming traffic

N00b - "set" directive is not allowed here

2017-04-25 Thread Joel Parker
I have a set directive inside an http block which I thought was valid but when I run config -t it says the nginx: [emerg] "set" directive is not allowed here. http { log_format bodylog '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent '

Re: N00b - logging stream request / response

2017-04-25 Thread Joel Parker
accomplish this. Joel On Tue, Apr 25, 2017 at 1:49 PM, Robert Paprocki < rpapro...@fearnothingproductions.net> wrote: > No. stream {} and http {} blocks are mutually exclusive. > > What exactly are you trying to accomplish with stream? > > On Tue, Apr 25, 2017 at 11:46 AM, Joe

Re: N00b - logging stream request / response

2017-04-25 Thread Joel Parker
ntax: *log_format* *name* [escape=default|json] *string* ...; > Default: > > log_format combined "..."; > > Context: http > > > > On Tue, Apr 25, 2017 at 11:32 AM, Joel Parker <joel.parker...@gmail.com> > wrote: > >> I am trying to log all req

N00b - logging stream request / response

2017-04-25 Thread Joel Parker
I am trying to log all request / response in a stream with a lua script I found in git hub and am having issues figuring out where to put the log_format directive. Here is what I currently have : stream { log_format bodylog '$remote_addr - $remote_user [$time_local] ' '"$request"

Re: invalid default_server parrameter

2017-04-24 Thread Joel Parker
I'm still trying to figure this all out. I am just going to remove default_server for now like you suggested. The config checker doesn't complain anymore ... we'll see if it works. Joel On Mon, Apr 24, 2017 at 2:10 PM, Joel Parker <joel.parker...@gmail.com> wrote: > I have many server

invalid default_server parrameter

2017-04-24 Thread Joel Parker
I have many servers sending ssl which I am trying to terminate. So I wanted to create a statement that was a catch all instead of listening for each ip address. I thought this would do it : server { listen 443 ssl default_server; .. } but when I run nginx -t, I keep getting the

Re: Config advice / wireshark

2017-04-21 Thread Joel Parker
I guess logging would work I just need to capture the full request and response to replay later. Is there a standard way to do this or plugin available ? On Fri, Apr 21, 2017 at 10:42 AM, Joel Parker <joel.parker...@gmail.com> wrote: > The only other thing I was thinking of was to dou

Re: Config advice / wireshark

2017-04-21 Thread Joel Parker
s.net> wrote: > Is what compatible? Nginx logging? I don't think so, Nginx logs are > intended to be human readable. Related docs: http://nginx.org/en/ > docs/http/ngx_http_log_module.html#log_format > > On Fri, Apr 21, 2017 at 8:25 AM, Joel Parker <joel.parker...@gmail.co

Re: Config advice / wireshark

2017-04-21 Thread Joel Parker
Is it compatible with something like log2pcap ? or I just need to set the format somehow to be compatible with it. Joel Parker On Fri, Apr 21, 2017 at 10:21 AM, Robert Paprocki < rpapro...@fearnothingproductions.net> wrote: > Unless wireshark has access to the private key (and PFC isn'

Config advice / wireshark

2017-04-21 Thread Joel Parker
I currently have a config that allows me to terminate TLSv1.2 and decrypt it. Then it re-encrypts the packets with a different cert before sending to the upstream servers. I want to "look" at the decrypted packets before they are encrypted but I am not sure the best way to accomplish this.

Configuration advice

2017-04-21 Thread Joel Parker
I currently have a config that allows me to terminate TLSv1.2 and decrypt it. Then it re-encrypts the packets with a different cert before sending to the upstream servers. I want to "look" at the decrypted packets before they are encrypted but I am not sure the best way to accomplish this.