Skip to main content

EasyApache 4 killing and not restarting nginx site

Comments

7 comments

  • cPanelMichael
    Hello @TheFez, Are you using a specific third-party plugin for Nginx or is this something you've manually configured on your own? If you've setup Nginx on your own, you could look at how other Nginx plugins handle the Apache ports to get a better idea of how to approach the issue. For example, the apache_change_port function on the following third-party Nginx plugin might help: engintron/engintron Thank you.
    0
  • TheFez
    I'm not using any plugins for nginx. It was installed through rpm via yum and nginx is managed outside the scope of cPanel. I'm looking to configure EasyApache to only kill processes running on port 80 for IP addresses assigned to Apache and to ignore IPs assigned to nginx. Or to only kill httpd and not nginx. Let EasyApache manage Apache and leave nginx alone.
    0
  • cPanelMichael
    Hello @TheFez, Keep in mind that using Nginx and Apache together is unsupported on cPanel & WHM. It generally requires the development of a multifaceted plugin (like the one referenced in my last response). That said, if you're looking for a simply fix, would changing the default ports utilized by Apache help? If so, you could configure Apache to run on different ports by adjusting the following options under the System tab in WHM >> Tweak Settings: Apache non-SSL IP/port Apache SSL port Thank you.
    0
  • TheFez
    Sounds like this is not possible without changing Apache to use non-standard ports, which is obviously a no-go. I appreciate the assistance, but it is frustrating that EasyApache isn't a little more cognisant of not stomping on other services. Why it can't do a systemctl stop httpd rather than killing everything it finds on port 80 and 443 is ridiculous. I'll go with writing a script in the postupcp that restarts nginx after EasyApache does its murderous rampage upon nginx.
    0
  • cPanelMichael
    Hi @TheFez, Is there a particular issue you'd face when configuring Apache to run on non-standard ports? The virtual hosts are configured automatically upon adjusting those options in WHM >> Tweak Settings. EasyApache 4 is designed and tested to be used with Apache. We do have a couple of planned feature requests that would offer native support for Nginx: However, in the meantime, integrating Nginx directly through your YUM isn't recommended. Instead, you'd need to build out a custom EasyApache 4 RPM using the guidelines documented at: Or, have you thought about using a third-party Nginx plugin that's already designed to integrate with EA4? Another alternative is LiteSpeed, which also is designed to integrate directly with EasyApache 4. Thank you.
    0
  • TheFez
    Hi @TheFez, Is there a particular issue you'd face when configuring Apache to run on non-standard ports? The virtual hosts are configured automatically upon adjusting those options in WHM >> Tweak Settings.

    Yes, I'm not looking to send users to www.notreallymysite.com:8088 or whatever. No one is going to type that in. Any existing links will be broken.
    0
  • Anoop P Alias
    You do not need to send customers to alternate ports. You can simply have nginx listen on 80/443 and have the one site you need directly served by nginx and other sites proxied to Apache.
    0

Please sign in to leave a comment.