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

Issue Apache doesn't accept connections from nginx anymore

Heinrich

Basic Pleskian
Hello everyone,

since two days or so nginx only produces gateway timeouts (Error 504), unless I set the domain in question to not use the proxy but serve all data with nginx.
But I can't do that with webmail.

In any case, I'd like the server to work again properly.
plesk repair all didn't fix the problem, neither did
plesk sbin httpdmng --reconfigure-all

I also can't find any specific errors in the logs of apache....

The day the problem occurred I used apt to reinstall openssl and ca-certificates. So possibly nginx and apache can't communicate because of TLS settings.
Are there any CAs I would need to reinstall, too. PLESK specific...?
 
For starters, is your Apache even running? What does 'systemctl status apache2.service' report? Can you stop and start Apache normally?
 
Yes it is. I used 'service apache2 status' but the output is the same and "running" in written in a friendly, non-threatening green.

apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Sa 2019-11-23 15:10:30 UTC; 4h 19min ago
Docs: man:systemd-sysv-generator(8)
Process: XXXXX ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCES
Process: XXXXX ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SU
Process: XXXXX ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCC
CGroup: /system.slice/apache2.service
├─11125 /usr/sbin/apache2 -k start
├─11128 Passenger watchdog
└─20929 /usr/sbin/apache2 -k start

It does seem to fail occasionally, though.
But testing the syntax didn't reveal mistakes in the configuration.
 
I think it is possible that a change in openssl has modified the configuration files in a way that Apache is not listening on the right port any longer. You can test that by
Debian:
# netstat -anp | grep apache
that should yield the ports 7080 and 7081 in the result like
Code:
tcp        0      0 0.0.0.0:7080            0.0.0.0:*               LISTEN      18435/httpd
tcp        0      0 0.0.0.0:7081            0.0.0.0:*               LISTEN      18435/httpd
unix  3      [ ]         STREAM     CONNECTED     26161915 18435/httpd

If these ports are wrong, probably the openssl modifications have modified general Apache files. And who knows what else they have done ... Depending on how many websites there are on the system and how much downtime you could afford, you could try to first remove Apache through the Plesk Installer, the reinstall it. This might be necessary to regenerate not only the configuration files that are generated by httpmng, but also the basic configuration files of the web server installation. After reinstallation, probably a reconfigure-all will be necessary, too.

But make a full backup of all websites, configurations etc. to be able to restore everything in case that this makes things worse.
 
The command returns
tcp6 0 0 :::7080 :::* LISTEN 11125/apache2
tcp6 0 0 :::7081 :::* LISTEN 11125/apache2

Not sure if nginx will use ipv6 for the proxy to apache2.

In any case, is there a way to only deinstall and reinstall apache2, without pretty much every other aspect of plesk. For when I try to use the components add/remove page, it tells me about the removal of apache is a conflict with PLESK, but also it will deinstall all extensions and a lot of other parts of my server. So, I don't want that, if it ain't necessary.
 
Well, purging apache2 with dpkg and reinstalled it, ran repair installation. So far the error remains...
 
Well, purging apache2 with dpkg and reinstalled it, ran repair installation. So far the error remains...
Oh no, that is definitely something not to do, because when you install Apache from your normal package manager, the configuration that it needs to communicate as a back end server, cannot be correct. This might have broken PHP settings, too. Too many dependencies with Plesk.

I'd probably ask official Plesk support at this point. To solve this it will need investigation on your system, but the solution will likely be to reinstall the system (given that "plesk repair installation" did not work for you) and to restore the content from your Plesk full backup.
 
Well I did restore the server to the setting before the purge and reinstall, so the original error is still occuring...
 
Back
Top