• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Nginx and Securi

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
 
Hi Nadeem Aslam,

Since i'm not a nginx expert - should i edit nginx.conf for the domain or does the rule need a rewrite
Sorry, but you posted in a "Plesk - related" - forum. Even that you are able to insert "additional nginx directives" over the Plesk Control Panel, this doesn't mean, that your issue is "Plesk - related" ( which it isn't ). Pls. consider to open such a thread/discussion at => Home > Forum > General Discussion > Open Topics


Additional informations:
Pls. note, that NGINX rewrite - questions should be asked at for example at: => Nginx Forum

this setting only need to apply to one domain and it's sub domains so not a global setting
"location" - definitions are never global settings, they are always (sub)domain - specific, which need to be placed inside the (sub)domain - specific configuration files, or inside the "vhosts_nginx.conf".

There suggested information is this
If "they" suggest a basic solution for their product, they should be aware about issues/errors/problems, in case that templates are used and already defined directives as within Plesk templates as:
Code:
    location / {
        proxy_pass https://207.38.89.43:7081;
        proxy_set_header Host             $host;
        proxy_set_header X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header X-Accel-Internal /internal-nginx-static-location;
        access_log off;
    }
... are already existent. Consider to ask "them" to rewrite their suggestions for that cases. ;)
 
Back
Top