I'm a developer, not a network administrator, so this is not exactly my cup of tea. Help is appreciated.
From one moment to the next, my VPS, running CentOS Linux 7.2.1511, stopped accepting http connections. A simple telnet to one of my hosted domains returns a "Connection refused". while FTP still works and I can also still SSH to the server. I have a total of 17 domains running on this server.
Apache is running (or claims to be running according to Plesk 12.5.30).
When, on the server's command line, I run
/sbin/iptables -L -n
the result is
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
When I to a trace route to one of my hosted domains, the fourteenth hop arrives on my server's IP address, but, after that, only asterisks show up, like so:
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
With my hosting provider's support offline from Friday night to, incredibly, Monday morning, I'm very much at a loss as to how to resolve this. Some pointers, suggestions, help, would be very much appreciated.
Update: If I understand this answer correctly, using the following command should tell me whether anything is listening on port 80, which is the default port for http connections:
ss -tnlp | grep :80
This command returns nothing, which I understand to mean that nothing is listening on port 80.
So, does the question then become, how to get Apache to listen to port 80 again?
Update: I updated httpd.conf and added 'Listen 80', which wasn't there. This worked, somewhat, in that, now, the server was accepting http requests again. However, it was still not showing any websites, but a placeholder page instead. httpd.conf did already have a 'Listen 7080', and, lo, visiting 'http://{{oneofmywebsites}}:7080 works as expected.
So, does the question now become, how to set the server to, by default, serve http requests over port 7080?
Update: This answer mentions a vhost.conf, which I couldn't find. However, it seems that it's possible to define a VirtualHost inside httpd.conf as well. Of the 17 domains I host on this server, there's one that's the 'main' domain, which I take it, in a way, represents the server. (Keep in mind, this is not my cup of tea.)
So, I added the following to httpd.conf:
<VirtualHost *:80>
ServerName {{mymaindomain}}
ProxyPass / http://localhost:7080/
</VirtualHost>
After restarting Apache, browsing to http://{{mymaindomain}} now actually serves the associated website. Hurrah! But, browsing to any other domain that I host as well, also goes to the same content (http://{{mymaindomain}}).
If I add another VirtualHost section in httpd.conf, like so:
<VirtualHost *:80>
ServerName {{someotherdomain}}
ProxyPass / http://localhost:7080/
</VirtualHost>
Then, the result is that, when browsing to http://{{someotherdomain}}, I get presented with a 'Service Unavailable'.
So now, how do I make sure all websites redirect properly? Wouldn't this be some configuration in Plesk? How is it possible that this stopped working, from one moment to the next, for all my websites?
Update: Quite in above my head, the following applies:
<VirtualHost *:80>
ServerName {{mymaindomain}}
ProxyPass / http://localhost:7080/
</VirtualHost>
The above works as I would like it to: browser requests for http://{{mymaindomain}} show the associated website.
<VirtualHost *:80>
ServerName {{myseconddomain}}
ProxyPass / http://{{myseconddomain}}:7080/
</VirtualHost>
The above domain is using CloudFlare. Browsing to http://{{myseconddomain}} does not work; CloudFlare is not able to reach the server.
<VirtualHost *:80>
ServerName {{mythirddomain}}
ProxyPass / http://{{mythirddomain}}:7080/
</VirtualHost>
The above domain is not using CloudFlare. Browsing to http://{{mythirddomain}} shows the associated website.
I still don't understand what is causing all this, help is still appreciated.
Meanwhile, I could move all domains off CloudFlare, but then I need to somehow set up https, which was working fine, before.
Update: Below, @HardyRust's mentions nginx perhaps listening on port 80.
I executed:
systemctl status nginx.service
Which got me the below. The 'since...' is pretty much when my server stopped working.
● nginx.service - Startup script for nginx service
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2016-10-01 00:23:25 CEST; 1 day 1h ago
Oct 01 00:23:24 {{mymaindomain}} systemd[1]: Starting Startup script for nginx service...
Oct 01 00:23:25 {{mymaindomain}} nginx[1066]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Oct 01 00:23:25 {{mymaindomain}} nginx[1066]: nginx: [emerg] bind() to [{{my ipv6 address}}]:443 failed (99: Cannot assign requested address)
Oct 01 00:23:25 {{mymaindomain}} nginx[1066]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 01 00:23:25 {{mymaindomain}} systemd[1]: nginx.service: control process exited, code=exited status=1
Oct 01 00:23:25 {{mymaindomain}} systemd[1]: Failed to start Startup script for nginx service.
Oct 01 00:23:25 {{mymaindomain}} systemd[1]: Unit nginx.service entered failed state.
Oct 01 00:23:25 {{mymaindomain}} systemd[1]: nginx.service failed.
So, why would it not be possible to 'assign requested address'?
Any suggestions are very welcome, and needed. I have no idea what /etc/nginx/nginx.conf is supposed to look like, but its 30 or so lines look like they belong.