Setting Up a Nginx Server or OpenResty on OS X or UBUNTU with http_auth_request_module
sscotti at sscotti.org
sscotti at sscotti.org
Fri May 1 21:31:27 UTC 2020
I need to set up an NGINX server on OS X or UBUNTU that has the http_auth_request_module installed and enabled. I am kind of a novice when it comes to NGINX, but familiar with Apache, LINUX, etc. There is an NGINX server packaged with my MAMP Pro server on OS X, but I don't think that comes with the http_auth_request_module:
I actually do (I think) want to try using Nginx as a reverse proxy, but I will have to do some research about that also. First, I need to just get a server up and running with that module enabled. I would prefer using OS X because I do most of my development on a Mac, but installing on an UBUNTU VM would also probably work.
I did try installing OpenResty using the brew package manager on OS X, and if install with "verbose" I get the log for ./configure, which looks like it is compiled with that included. So that might work ? How do I tell if that module is actually enabled ? It does say --with that module (bold).
brew reinstall openresty/brew/openresty --verbose (or just install)
____________________
Brew compile output:
./configure -j8 --prefix=/usr/local/Cellar/openresty/1.15.8.3_1 --pid-path=/usr/local/var/run/openresty.pid --lock-path=/usr/local/var/run/openresty.lock --conf-path=/usr/local/etc/openresty/nginx.conf --http-log-path=/usr/local/var/log/nginx/access.log --error-log-path=/usr/local/var/log/nginx/error.log --with-cc-opt=-I/usr/local/include -I/usr/local/opt/pcre/include -I/usr/local/opt/openresty-openssl/include --with-ld-opt=-L/usr/local/lib -L/usr/local/opt/pcre/lib -L/usr/local/opt/openresty-openssl/lib --with-pcre-jit --without-http_rds_json_module --without-http_rds_csv_module --without-lua_rds_parser --with-ipv6 --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_geoip_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-luajit-xcflags=-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -fno-stack-check --with-dtrace-probes
platform: macosx (darwin)
. . . .
To have launchd start openresty/brew/openresty now and restart at login:
brew services start openresty/brew/openresty
Or, if you don't want/need a background service you can just run:
openresty
___________________
The config file for openresty is here: /usr/local/etc/openresty/nginx.conf, set to listen on 81, http, and that works, I get the welcome page.
Welcome to OpenResty!
So I guess my question is how to I know that the http_auth_request_module is actually there, and then how to go about setting up as a reverse proxy.
I know that part is probably dependent on my setup. If someone can help with that it would be greatly appreciated, although it seems like it is installed on OS X.
E-mails: sscotti at sscotti.org, sscotti at icloud.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20200501/ebac9f4a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 64093 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20200501/ebac9f4a/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3873 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20200501/ebac9f4a/attachment-0001.bin>
More information about the nginx-devel
mailing list