Author Topic: 502 Bad Gateway  (Read 10058 times)

0 Members and 1 Guest are viewing this topic.

Offline
****
Re: 502 Bad Gateway
« Reply #15 on: March 11, 2022, 12:57:28 PM »
Nginx cannot run without php-fpm.  Apache uses built in modules to connect to php.  Nginx does not have those, so it requires a standalone version of php such as php-cgi or php-fpm
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: 502 Bad Gateway
« Reply #16 on: March 14, 2022, 04:35:25 AM »
Nginx cannot run without php-fpm.  Apache uses built-in modules to connect to php.  Nginx does not have those, so it requires a standalone version of php such as php-cgi or php-fpm

Yes, I agree. That is why I purchased and subscribed to the CWP Pro version to support its development.
However, I noticed I could not use nginx alone. I would need to use something that has Apache for it to work.
Is it because it is incompatible with the latest version of 7.4 of PHP? Or do I need to use the last 5.6 version?

My current configuration is nginx > varnish > apache.
I prefer either nginx alone or nginx > varnish.

I accidentally solved it.
I pressed fixed permission when user nobody is selected.

nginx alone works now.
and nginx > varnish still doesn't work though.



Also, I don't understand this:

Code: [Select]
Nginx & Varnish
Additional Options: nginx/php-fpm, proxy
HTTP: Nginx (80) --> Varnish (82)
HTTPS: Nginx (443) --> Varnish (82)
Info: Useful as nginx/varnish proxy cache for NodeJS, Ruby, Tomcat
** Requires custom configuration per domain, as default behavior is proxy to varnish.
** Varnish you can enable additionally for domains you need.

What does it require and what do I need to do?
« Last Edit: March 14, 2022, 05:03:34 AM by AdventureTime »

Offline
*
Re: 502 Bad Gateway
« Reply #17 on: March 14, 2022, 06:24:55 AM »
nginx + varnish can be used only if you proxy varnish to the custom app, like nodejs, tomcat....
if you want to use php then you can use only the option where the last server is nginx or apache.

However, you can also set per domain to use nginx + php-fpm if you have selected nginx/varnish webserver setup.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: 502 Bad Gateway
« Reply #18 on: March 14, 2022, 09:00:10 AM »
nginx + varnish can be used only if you proxy varnish to the custom app, like nodejs, tomcat....
if you want to use php then you can use only the option where the last server is nginx or apache.

However, you can also set per domain to use nginx + php-fpm if you have selected nginx/varnish webserver setup.

Oh wait. I can't use Varnish for WordPress?
How to proxy it or something?

Offline
***
Re: 502 Bad Gateway
« Reply #19 on: March 14, 2022, 10:51:07 AM »
Why don't you make your life easier by switching to Nginx & Varnish & Apache and then assign "Nginx -> php-fpm" to those sites you insist on having it "nginx - php-fpm"?

Basically, make your wordpress run with Nginx - Varnish - Apache.
Varnish needs to be manually enabled by re-selecting this webserver configuration through the WebServer Domain Conf.
There you can choose a varnish template made for wordpress.

My wordpress site is running like this with varnish.
« Last Edit: March 14, 2022, 10:53:07 AM by iraqiboy90 »

Offline
*
Re: 502 Bad Gateway
« Reply #20 on: March 14, 2022, 12:04:54 PM »
nginx + varnish can be used only if you proxy varnish to the custom app, like nodejs, tomcat....
if you want to use php then you can use only the option where the last server is nginx or apache.

However, you can also set per domain to use nginx + php-fpm if you have selected nginx/varnish webserver setup.

Oh wait. I can't use Varnish for WordPress?
How to proxy it or something?

You can check our wiki how to use Varnish,

http://wiki.centos-webpanel.com/how-to-install-varnish

Offline
*
Re: 502 Bad Gateway
« Reply #21 on: March 14, 2022, 12:33:50 PM »
Why don't you make your life easier by switching to Nginx & Varnish & Apache and then assign "Nginx -> php-fpm" to those sites you insist on having it "nginx - php-fpm"?

Basically, make your wordpress run with Nginx - Varnish - Apache.
Varnish needs to be manually enabled by re-selecting this webserver configuration through the WebServer Domain Conf.
There you can choose a varnish template made for wordpress.

My wordpress site is running like this with varnish.
I tried to make my life easier too. However, I prefer to avoid Apache because it is completely unstable. I have seen the performance of nginx and it seems that completely utilizing nginx is the way to go...

Offline
*
Re: 502 Bad Gateway
« Reply #22 on: March 14, 2022, 01:03:55 PM »
nginx + varnish can be used only if you proxy varnish to the custom app, like nodejs, tomcat....
if you want to use php then you can use only the option where the last server is nginx or apache.

However, you can also set per domain to use nginx + php-fpm if you have selected nginx/varnish webserver setup.

Oh wait. I can't use Varnish for WordPress?
How to proxy it or something?

You can check our wiki how to use Varnish,

http://wiki.centos-webpanel.com/how-to-install-varnish

Thanks for this!