Nadeem Aslam
New Pleskian
Hi
I'm running a server with plesk nginx, apache, mysql the standard stuff, in front of the server sits a web based firewall called Securi
In order to stop the firewall being bypassed they offer some information on how to do it on apache as well as nginx
There suggested information is this
location / {
allow 192.88.134.0/23;
allow 185.93.228.0/22;
allow 2a02:fe80::/29;
allow 66.248.200.0/22;
deny all;
# Existing NGINX rules
}
But when i put that into the Additional nginx directives within the pelsk interface i get the following error
Invalid nginx configuration: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/domain.org.uk/conf/vhost_nginx.conf:13 nginx: configuration file /etc/nginx/nginx.conf test failed
My question is the fix i did think about editing nginx.conf for the domain and trying it in there but i know plesk / nginx sort of works different - this setting only need to apply to one domain and it's sub domains so not a global setting
Since i'm not a nginx expert - should i edit nginx.conf for the domain or does the rule need a rewrite - also i think there is a command to run to rebuild nginx or something
Thanks
Nadeem
I'm running a server with plesk nginx, apache, mysql the standard stuff, in front of the server sits a web based firewall called Securi
In order to stop the firewall being bypassed they offer some information on how to do it on apache as well as nginx
There suggested information is this
location / {
allow 192.88.134.0/23;
allow 185.93.228.0/22;
allow 2a02:fe80::/29;
allow 66.248.200.0/22;
deny all;
# Existing NGINX rules
}
But when i put that into the Additional nginx directives within the pelsk interface i get the following error
Invalid nginx configuration: nginx: [emerg] duplicate location "/" in /var/www/vhosts/system/domain.org.uk/conf/vhost_nginx.conf:13 nginx: configuration file /etc/nginx/nginx.conf test failed
My question is the fix i did think about editing nginx.conf for the domain and trying it in there but i know plesk / nginx sort of works different - this setting only need to apply to one domain and it's sub domains so not a global setting
Since i'm not a nginx expert - should i edit nginx.conf for the domain or does the rule need a rewrite - also i think there is a command to run to rebuild nginx or something
Thanks
Nadeem