budiantoip
New Pleskian
- Server operating system version
 - CentOS 7.9
 
- Plesk version and microupdate number
 - 18.0.65_build1800241122.08
 
Hello,
I have Plesk Obsidian installed on CentOS 7.9 and have the following Nginx configuration file:
	
	
	
		
The file content is as follows:
	
	
	
		
As noted in the first few lines, this file is auto-generated, and manual changes will be overwritten. I would like to implement a rate-limiting rule.
I have tried searching on Google, but I haven’t had any luck so far.
Does anyone know the recommended way to achieve this without directly modifying the auto-generated file?
Thank you!
Regards,
Budianto IP
				
			I have Plesk Obsidian installed on CentOS 7.9 and have the following Nginx configuration file:
		Bash:
	
	/etc/nginx/plesk.conf.d/server.conf
	
		NGINX:
	
	#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
include "/etc/nginx/plesk.conf.d/ip_default/*.conf";
server {
    listen 1.2.3.4:443 ssl;
    ssl_certificate             "/usr/local/psa/var/certificates/xxxxxxxxx";
    ssl_certificate_key         "/usr/local/psa/var/certificates/xxxxxxxxx";
    client_max_body_size 2048m;
    proxy_read_timeout 600;
    proxy_send_timeout 600;
    proxy_max_temp_file_size 0;
    proxy_buffers 16 16k;
    proxy_buffer_size 32k;
    proxy_busy_buffers_size 32k;
    server_name _;
    location / {
        proxy_pass http://127.0.0.1:8880;
        proxy_redirect http://$host:8880 $scheme://$host;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Http-Host $host:$server_port;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        access_log off;
        gzip on;
        gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
    }
    location ~ /ws$ {
        proxy_pass http://127.0.0.1:8880;
        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Http-Host $host:$server_port;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        access_log off;
    }
    underscores_in_headers on;
}
server {
    listen 1.2.3.4:80;
    location ^~ /plesk-site-preview/ {
        proxy_pass http://127.0.0.1:8880;
        proxy_set_header Host               plesk-site-preview.local;
        proxy_set_header X-Real-IP          $remote_addr;
        proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto  $scheme;
        proxy_cookie_domain plesk-site-preview.local $host;
        access_log off;
    }
    location / {
        proxy_pass http://1.2.3.4:7080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
server {
    listen 1.2.3.4:443 ssl;
    server_name lists.*;
    ssl_certificate             /usr/local/psa/var/certificates/xxxxxxxxx;
    ssl_certificate_key         /usr/local/psa/var/certificates/xxxxxxxxx;
    location / {
        proxy_pass https://1.2.3.4:7081;
        proxy_hide_header upgrade;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
	As noted in the first few lines, this file is auto-generated, and manual changes will be overwritten. I would like to implement a rate-limiting rule.
I have tried searching on Google, but I haven’t had any luck so far.
Does anyone know the recommended way to achieve this without directly modifying the auto-generated file?
Thank you!
Regards,
Budianto IP