• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Turning off Nginx for one domain

tr_ibrahim

New Pleskian
Hey,

I am using plesk 12.5.30 web host linux edition, my os centos 7. I want to turn off nginx and use only apache for this domain . How can i achieve this ?
 
Hey,

I am using plesk 12.5.30 web host linux edition, my os centos 7. I want to turn off nginx and use only apache for this domain . How can i achieve this ?
You can simply uninstall from Nginx in "Tools & Settings > Updates and upgrades" - then all your domains will be on Apache only.
However disabling Nginx for a selected domain only doesn't seem possible - as Nginx (or Apache) act server-wide, capturing complete traffic (all domains). You can only rule the degree of processing in Nginx but the default one is quite lightweight and transparent (so called "reverse proxy").
Now sure how much the reference above can be helpful in your case.
Good luck
 
You can have your PHP scripts go through CGI or FastCGI through Apache instead of through Nginx but Nginx itself cannot be disabled unless you do what @Sergey L said and to uninstall Nginx.
 
@scsa20 and @Sergey L,

Yes, Nginx can be "disabled" without de-installation of Nginx: it is possible, even on a "per domain" base, but it would require more work than actually is efficient or desirable.

Anyway, I would not know at all why anyone would want to remove Nginx and only use Apache (without Nginx as a proxy).

Regards....
 
@scsa20 and @Sergey L,

Yes, Nginx can be "disabled" without de-installation of Nginx: it is possible, even on a "per domain" base, but it would require more work than actually is efficient or desirable.

Anyway, I would not know at all why anyone would want to remove Nginx and only use Apache (without Nginx as a proxy).

Regards....
Constant 504 gateway timeout errors would be a very good reason not to want Nginx around at all.
 
@scsa20 and @Sergey L,

Anyway, I would not know at all why anyone would want to remove Nginx and only use Apache (without Nginx as a proxy).

Regards....
Very easily.
- Because Nginx in the current configuration slows down the Apache strongly towards the outside.
- Because the additional settings of the Apache that you entered in Plesk are not transferred to Nginx and so, among other things, no more text compression takes place....
- Because Nginx and its possible settings in Plesk are very poorly documented.

The above applies to pages with highly dynamic content.
For domains with more static content, one would like to switch Nginx before the Apache in order to relieve him.
It would therefore be very useful if Plesk implemented Nginx in such a way that Nginx can either be used per domain with Apache, or Nginx can be completely switched off for a domain.
 
Constant 504 gateway timeout errors would be a very good reason not to want Nginx around at all.
@Robpl1

In most cases, the 504 gateway timeout errors are related to

1 - suboptimal Nginx configuration,

(and/or)

2 - Apache webserver not functioning properly, in the sense that the Apache overload impacts Nginx negatively : Nginx does not get the response from Apache.


In essence, you should want Nginx as a proxy, since Apache has too many drawbacks by default - these drawbacks can often only be solved by highly customized configuration on the Apache level (with the ironic disadvantage that Apache performance becomes worse, at least in most cases) OR by increasing the resources on a server (with the disadvantage that these additional resources are often not optimally used ..... and I am not starting about the costs!).


Nevertheless, I do agree with you to some extent : the default Nginx config provided with Plesk is not suitable and causes 504 timeout errors.


It is a bit of a puzzle - it is difficult to conclude that Nginx should not be present, since Nginx is actually not configured properly within Plesk.

In my humble opinion, one can only come to a conclusion based on preferences (Nginx is not required to be present, so a simple Apache web server would also suffice) or based upon a setup of Apache + Nginx with a proper configuration.

It is just an opinion, do not shoot the messenger :)

Ah, please note that any discussion about Apache, Nginx or Apache + Nginx does not make any sense if the code on the web server level is rubbish.

And the latter is often the case, certainly when one uses WordPress based sites.

Kind regards......
 
Very easily.
- Because Nginx in the current configuration slows down the Apache strongly towards the outside.
- Because the additional settings of the Apache that you entered in Plesk are not transferred to Nginx and so, among other things, no more text compression takes place....
- Because Nginx and its possible settings in Plesk are very poorly documented.

The above applies to pages with highly dynamic content.
For domains with more static content, one would like to switch Nginx before the Apache in order to relieve him.
It would therefore be very useful if Plesk implemented Nginx in such a way that Nginx can either be used per domain with Apache, or Nginx can be completely switched off for a domain.
@LTUser

I will not go in detail to multiple of your statements, since some indirect responses have been provided in my previous post.

However, you seem to implicitly state that it is not possible to enable/disable Nginx on a per-domain basis.

That is incorrect : Plesk allows to enable/disable Nginx on a per-domain basis.

And that is logical way to setup the infrastructure of domain hosting : some specific application frameworks or even applications do not need Nginx.

By the way, I do agree to some extent that the vast number of options to configure Nginx in Plesk could be better documented.

Nevertheless, a lot of the options to configure Nginx are "out-of-the-box" configuration settings : these are documented on Nginx sites and other sites.

Kind regards.....
 
That is incorrect : Plesk allows to enable/disable Nginx on a per-domain basis.
I can't find where I can completely turn off Nginx per domain so that all pages from this domain are only served by Apache.
The option, if Nginx is activated, to pass everything from Nginx to Apache does not help.
All advanced options for the Apache under (/smb/web/web-server-settings/id/$) -> "https" are lost somewhere because Nginx is switched in between.
1632381106515.png

Another example, if Apache is running "standalone", gives the following values for the start page of the forum with google pagespeed:
1632379947028-png.19416

As soon as Nginx is activated and cannot be switched off, it serves as a proxy for Apache:
1632380121435-png.19417


This is a big difference that I can only prevent if I deactivate Nginx completely, i.e. for all domains.

So if you know a way to really switch off Nginx via domain and not have to use it as a proxy for the Apache, then bring it on.
 
I can't find where I can completely turn off Nginx per domain so that all pages from this domain are only served by Apache.
The option, if Nginx is activated, to pass everything from Nginx to Apache does not help.
All advanced options for the Apache under (/smb/web/web-server-settings/id/$) -> "https" are lost somewhere because Nginx is switched in between.
View attachment 19418

Another example, if Apache is running "standalone", gives the following values for the start page of the forum with google pagespeed:
1632379947028-png.19416

As soon as Nginx is activated and cannot be switched off, it serves as a proxy for Apache:
1632380121435-png.19417


This is a big difference that I can only prevent if I deactivate Nginx completely, i.e. for all domains.

So if you know a way to really switch off Nginx via domain and not have to use it as a proxy for the Apache, then bring it on.
You should be looking at what is causing the difference. Correlation != causation. If it's text compression, turn on Brotli/GZIP for NGINX. NGINX does not "slows down the Apache strongly towards the outside."

You cannot turn of NGINX for just one domain. NGINX is bound to 80/443 on your IPs, meaning nothing else can bind and all standard HTTP/HTTPS requests must pass through NGINX. In theory, you could have nginx only bind to specific IPs and also bind apache to another IP, but...there's little good reason to do that.
 
In theory, you could have nginx only bind to specific IPs and also bind apache to another IP, but...there's little good reason to do that.

Only Plesk can do exactly this so that the system remains maintainable. We consciously and from experience refrain from changing Plesk specifications.

So, and too many necessary changes, you cannot use the Apache / Nginx team if you have been using Apache for many years. However, since it is stated above that there is no need for changes and then that the necessary changes are possible with Plesk, I wanted to show here that there is indeed a need and the necessary adjustments are not yet possible with Plesk.

You say that there are only a few good reasons to adapt this, I say there are many customers who would use and appreciate this adaptation. Plesk would do well not to constantly implement new and dangerous extensions such as the ssh mode in the Plesk panel, but rather to improve and expand existing functions.

I, like the TE and those who would never ask, would like to deliver static content such as on WordPress with Nginx, highly dynamic content such as that of a XenForo, with Apache - but WITHOUT a proxy that ignores the extended Apache settings.

We have a dream ... ;)
 
Only Plesk can do exactly this so that the system remains maintainable. We consciously and from experience refrain from changing Plesk specifications.

So, and too many necessary changes, you cannot use the Apache / Nginx team if you have been using Apache for many years. However, since it is stated above that there is no need for changes and then that the necessary changes are possible with Plesk, I wanted to show here that there is indeed a need and the necessary adjustments are not yet possible with Plesk.

You say that there are only a few good reasons to adapt this, I say there are many customers who would use and appreciate this adaptation. Plesk would do well not to constantly implement new and dangerous extensions such as the ssh mode in the Plesk panel, but rather to improve and expand existing functions.

I, like the TE and those who would never ask, would like to deliver static content such as on WordPress with Nginx, highly dynamic content such as that of a XenForo, with Apache - but WITHOUT a proxy that ignores the extended Apache settings.

We have a dream ... ;)

What problems with NGINX to Apache do you have exactly?
 
What problems with NGINX to Apache do you have exactly?
We have moved the extended Apache settings (rewrite, ssl, Gzip / Brotli, (...)) of the .htaccess to vhost_ssl.conf for several domains in order to speed up the Apache and to be able to switch off the use of a .htaccess for these domains .
All these advanced settings from vhost_ssl.conf are lost as soon as Nginx is switched in as a proxy and the domains are no longer functional
Since there is too much effort and the necessary Nginx knowledge would be missing to port these settings for Nginx, it would be easier to simply take Nginx out of the chain for these domains.
 
Since there is too much effort and the necessary Nginx knowledge would be missing to port these settings for Nginx, it would be easier to simply take Nginx out of the chain for these domains.
With all due respect that's not really a Plesk issue. If you don't want to/don't know how to transfer the configurations over to Nginx configs, but also want to use Nginx as a proxy, you'll have to make a compromise and choose one, I don't see a purpose in allowing the proposed scheme, complicating configuration further, for what appears to be a pebkac issue.
 
With all due respect that's not really a Plesk issue.
In my opinion, this is really not a Plesk problem, but it becomes a Plesk problem if Plesk "over night" undoes my settings, which deactivate Nginxproxying for this IP/domain and change the IP/domain to Apache only.
 
Back
Top