Hi guys
a novice here so go easy on me with this question:
having multiple 'listen' with IPs or, just one 'listen' with a hostname
which resolves to more than one IP - is it possible to tell Nginx not
fail when one of IPs is absent, does not exist?
many thanks, L.
Hello,
Is there a way to log individual websocket messages going through a nginx
server setup to proxy websocket as explained here
https://nginx.org/en/docs/http/websocket.html ?
-Chinmay
I had a wordpress blog and was working on Apache. I migrated the blog to
Nginx + php-fpm. But i have a problem with this.
My blog has RSS with example.com/feed URL , and i could see the feeds with
paged like this example -> http://www.kodcu.com/feed/?paged=45.
But in Nginx, this paged RSS urls dont work with my config. /feed and
/feed/?paged=X URLs shows top 10 content.
My nginx.conf same as below. How can i handle this problem?
user root root;
worker_processes 2;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 2;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
error_log /var/log/nginx/error.log;
access_log off;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/html text/plain text/css application/json
application/x-javascript text/xml application/xml application/xml+rss
text/javascript;
##
# Virtual Host Configs
##
index index.php index.html index.htm;
## See here: http://wiki.nginx.org/WordPress
server {
server_name example.comwww.example.com;
root /var/www/example.com;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
# This is cool because no php is touched for static content
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238692,238692#msg-238692
Dear,
I have a reverse-proxy in front of my two servers: web (apache2) and
email (nginx-iredmail).
The proxy-reverse is perfectly working with my web server running
Apache2, but I am not able to make it working for my email server.
The reverse-proxy and the email server are both running with the same
version of Nginx (1.9).
I have tried many configs without any success.
My last one:
***********************************************************************
server {
listen 446;
server_name email.domain.ltd;
location / {
proxy_pass https://email_server_ip:446;
proxy_ssl_certificate /etc/ssl/certs/cert.chained.crt;
proxy_ssl_certificate_key /etc/ssl/private/private.key;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
proxy_ssl_ciphers HIGH:!aNULL:!MD5;
proxy_ssl_trusted_certificate /etc/ssl/certs/cert.chained.crt;
proxy_ssl_verify on;
proxy_ssl_verify_depth 2;
proxy_ssl_session_reuse on;
error_log /var/log/nginx/error-proxy.log;
access_log /var/log/nginx/access-proxy.log;
}
}
Can I please have some help ??
Thx
--
Cordialement,
Thierry e-mail : lenaigst(a)maelenn.org
PGP Key: 0xB7E3B9CD
I am doing mTLS authentication . I am having trouble pinpointing the exact
issue because this happens intermittently. I have two clients setup for this
and this happens especially on only one client.
Below errors seem to randomly pop up
[info] 31561#31561: *359835776 SSL_write() failed (104: Connection reset by
peer) while sending to client, client
[info] 11969#11969: *402978165 SSL_write() failed (32: Broken pipe) while
sending to client
This is my nginx version
nginx version: nginx/1.20.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.1.1g FIPS 21 Apr 2020
TLS SNI support enabled
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,293852,293852#msg-293852
Hello NGINX community,
nginx gives me the error messages
- "js_import" is not allowed here
and
- "js_content" is unknown
and don't know what I did wrong.
I have the following NGINX config at '/etc/nginx/nginx.conf'
load_module modules/ngx_stream_js_module.so;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
#js_path inc/js;
js_import http.js ;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
. NGINX complains about `js_import`
[emerg] 1#1: "js_import" directive is not allowed here in
/etc/nginx/nginx.conf:15
and about
unknown directive "js_content" in /etc/nginx/conf.d/app.conf:7
The file '/etc/nginx/conf.d/app.conf' contains the following
server {
listen 80;
location /njs {
js_content http.hello ;
# root /var/www/html ;
}
}
I am using the docker image of NGINX.
Cheers
Sören Reinecke
Hi...
I'm using https://nginx.org/packages/rhel/8/SRPMS/nginx-1.20.2-1.el8.ngx.src.rpm
to compile NGINX to RHEL 8.5, with "--with-openssl=/openssl_1_1_1n"
parameter in the "%define BASE_CONFIGURE_ARGS" .SPEC file, and it
works fine. The NGINX package is compiled without errors.
Now I want to add the "--with-zlib=/zlib_1_2_12" parameter, to compile
NGINX with the latest zlib version 1.2.12, and I get these linker
errors:
...
objs/ngx_modules.o \
-Wl,-z,relro -Wl,-z,now -pie -ldl -lpthread -lpthread -lcrypt -lpcre
/openssl_1_1_1n/.openssl/lib/libssl.a
/openssl_1_1_1n/.openssl/lib/libcrypto.a -ldl -lpthread
/zlib_1_2_12/libz.a \
-Wl,-E
/usr/bin/ld: /zlib_1_2_12/libz.a(deflate.o): relocation R_X86_64_32S
against symbol `_length_code' can not be used when making a PIE
object; recompile with -fPIC
/usr/bin/ld: /zlib_1_2_12/libz.a(inflate.o): relocation R_X86_64_32S
against symbol `zcfree' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/ld: /zlib_1_2_12/libz.a(inftrees.o): relocation R_X86_64_32S
against `.rodata' can not be used when making a PIE object; recompile
with -fPIC
/usr/bin/ld: /zlib_1_2_12/libz.a(trees.o): relocation R_X86_64_32S
against symbol `_length_code' can not be used when making a PIE
object; recompile with -fPIC
/usr/bin/ld: /zlib_1_2_12/libz.a(zutil.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/ld: /zlib_1_2_12/libz.a(crc32.o): relocation R_X86_64_32S
against `.rodata' can not be used when making a PIE object; recompile
with -fPIC
/usr/bin/ld: /zlib_1_2_12/libz.a(inffast.o): relocation R_X86_64_32S
against `.rodata.str1.1' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
...
Is there a solution for this linker issue?
Thanks in advance.
The Mainline version of Nginx i.e 1.12.6 has the OpenSSL version 1.1.1m and
it is vulnerable.
Is there any plan to release another version of Nginx with the latest
OpenSSL(i.e 1.1.1n)?
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,293877,293877#msg-293877
Hi All,
We are seeing a gradual buildup of NGINX memory to the tune of 1-2 MB
every 15 mins or so. This memory doesn't comedown, please let us know how
can we know what is the reason for the same. Please note this is a free
version of NGINX.
rgds
Balaji
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,293859,293859#msg-293859