• 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

How do I configure a second IP address?

H

hscooper

Guest
I have two IP addresses bound to my NIC.

One of them (call it A) is used for serving Plesk websites.

The second one (B) I need for another application which will use port 80.

I added B to my Plesk server IP pool, but then Plesk sets it up so Apache binds to port 80 on B. My non-Plesk app won't start, because of binding errors (port already in use by apache).

Then, if I remove B from the Plesk server IP pool, my non-Plesk app starts fine (no binding errors), but I can't seem to connect to it.

What's the best way to set this up? Can I fix it with a firewall rule, or is there some way in Plesk to disable its use of port 80 on an IP address?
 
remove it from the pool and just add it in the operating system as an alias (ex eth0:0). do not let plesk know about the second ip address
 
I think I figured it out...

So simple, as it turns out. The problem wasn't Plesk--it was Apache, which, by default, listens on port 80 of all IP addresses.

All I needed to do was change the "Listen" command in httpd.conf from "Listen :80" to "Listen xxx.xxx.xxx.xxx:80", and restart Apache. Plesk's autogenerated config files still list the second IP address as an Apache VirtualHost, but that causes no problem, since Apache isn't listening on the second IP's port 80.
 
Back
Top