How can I sync nginx.conf in two keepalived server?

2024-01-30 Thread baalchina
Hi, all. I had just deploy two nginx servers and made them high-available using keepalived. I tested it, and HA works fine. But I had some new questions here: 1st, When I edited the nginx.conf in master server, how to transfer the conf file to backup server immediately? 2nd, And after I edited , I

Is there anyway to filter content and return a 403 in nginx?

2023-09-09 Thread baalchina
Hi, I had a nginx working as reverse proxy, and all my backend are http protocol. I want to filter the content, for example, if the content has a work like 'virus', then nginx return a 403. When I looked the ngx_http_sub_module, seems it can replace the content, such as replace 'virus' to 'health'

Can I rewrite https to http?

2023-08-14 Thread baalchina
Hi all, I had an nginx as a reserve proxy, with many web sites behind. And the nginx listen in 443(https) and 80(http). But not all my sites behind support https, so in some sites ,I only listen 80, like this: *server { listen 80; listen [::]:80; server_name nossl.ab

unable to forbidden access by ip

2021-06-18 Thread baalchina
Hi all, I am using nginx as my reverse proxy, and I do not want all Excel files in my server to be accessed in the internet. So I add this in my nginx.conf: location ~* \.(xls|xlsx)$ { allow 10.0.0.0/8; deny all; } while my intranet address is 10.0.0.0/8. I found in interne

is nginx support time-based acl?

2019-05-31 Thread baalchina
hi all, I have a Nginx server,which I want to setup a time-based acl, for example, during 8am to 17pm, Nginx accept all connections, during 17pm to 8am nextday, Nginx deny all connections. Different acl may be deployed in different sites. Is this possible? I looked at the ngx_http_access_module,

nginx got an 500 error when uploading files

2013-05-25 Thread baalchina
Hi everyone, I am using nginx 1.4.1 and php-fpm 5.3.25. Everything is fine except when I uploading files to server. I have a Discuz! x3(a forum system) and when I post threads, except attachment everything is fine, but when I add a small files(such as 30k rar,jpg or else), nginx give me a 500 er