• 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.

Error when changing Nginx configuration

Elicsan

New Pleskian
Hi there,

I have following problem when I try to cange the configuration file for Nginx in Plesk.

Details:
- Using Wordpress
- vServer
- PHP is handled through Nginx
- Memcached is enabled


To use the caching plugin "Cachify" in combination with memcached, the nginx configuration file must be edited.
Following config should be used:

Code:
## GZIP
gzip_static on;
## CHARSET
charset utf-8;
## INDEX LOCATION
location / {
	error_page 405 = @nocache;
 
	if ( $query_string ) {
		return 405;
	}
	if ( $request_method = POST ) {
		return 405;
	}
	if ( $request_uri ~ "/wp-" ) {
		return 405;
	}
	if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
		return 405;
	}
	
	default_type text/html;
	add_header X-Powered-By Cachify;
	set $memcached_key $host$uri;
	memcached_pass localhost:11211;
}
## NOCACHE LOCATION
location @nocache {
	try_files $uri $uri/ /index.php?$args;
}

When I try to save the new config, following error appears:

Invalid nginx configuration: nginx: [emerg] duplicate location "/" in /var/www/vhosts/systemmydomain/conf/vhost_nginx.conf:8 nginx: configuration file /etc/nginx/nginx.conf test failed


How can I use the necessary configuration? I used google before, but some people said, that the server templated needs to be edited?



Thanks in advance!
 
Back
Top