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

Advanced nginX directives for a vhost (memcached)

TechnoMan

New Pleskian
You can edit the nginx directives for the desired vhost at the webserver config. However, it seems like that you can only add basic directives, but not something like that:
Code:
http {

	# memcached servers
	upstream memcached-servers {
		server 127.0.0.1:11211;

	}

	# PHP-FPM upstream
	upstream php-fpm {
		server 127.0.0.1:9000;
	}

	server {

		## Listen ports
		listen 80;
		listen [::]:80;

	}
}

How can I do that?

Thanks
 
Memcache can be included as PHP-Extension and then it doesn't need to be configured for NGINX then. If you still insist to pass the requests from one upstream to another one and then back to the client, you loose all the advantages in speed, that you gained by using the NGINX proxy. Be aware that you can't pass the client requests to two upstream at the same time, only one after the other.
The memcache PHP-Extension is already served, when you pass the client requests over the PHP-FPM upstream.
 
Ah i see. But how can you do that in general? There are man other advanced nginX directives that won't be accepted in the panel.
 
Well, "won't be accepted" are the wrong words I think, because the integrated nginx-configuration-checker just checks, if your inputs are valid and if not, it will point to the line, where mistakes/problems/mis-configurations are beginning. As mentioned in your starting post, you cant't put "server" - directives in a "vhost" - directive... so the checker will indeed tell you, that this doesn't work. ^^ IF you really want to change a server directive, you could do this directly under "/etc/nginx/nginx.conf".
 
Back
Top