Jump to content

Different programs using the same port on different ips

Khoomn
Go to solution Solved by Khoomn,

Solved this yesterday but forgot to update. Problem was apache2 was using both ips in the /etc/apache2/ports.conf. Solution was to set the listen to a specific ip. Ex: Default is Listen 80 and SSL is Listen 443, set them to Listen 1.2.3.4:80 and Listen 1.2.3.4:443

It was really hard to come up with a title for this because its hard to explain in one sentence. I have a VPS I bought, it has 2 EXTERNAL IPv4 addresses assigned to it. I want one ip running apache2 and the other ip running a python3 script with flask for another website for data things im doing. I went into the apache2 configs and setup my website to use one of the ips and not the other and then went to the flask script and set it to use the other ip. My problem now is that even though they each are assigned their own ip, I still can't run the flask script because it says the port is being used. And when i try to access the 2nd ip meant for the flask script, it brings up the default apache website saying everything is working. How am I to fix this?

 

Edit: Solved this yesterday but forgot to update. Problem was apache2 was using both ips in the /etc/apache2/ports.conf. Solution was to set the listen to a specific ip. Ex: Default is Listen 80 and SSL is Listen 443, set them to Listen 1.2.3.4:80 and Listen 1.2.3.4:443

Link to comment
Share on other sites

Link to post
Share on other sites

the apache instance is still grabbing both interfaces, check your configs.

Link to comment
Share on other sites

Link to post
Share on other sites

Can you post /etc/apache2/ports.conf ? Remove ip's and other sensitive stuff.

 

Apache can bind itself on IP, port and protocol.

Link to comment
Share on other sites

Link to post
Share on other sites

Solved this yesterday but forgot to update. Problem was apache2 was using both ips in the /etc/apache2/ports.conf. Solution was to set the listen to a specific ip. Ex: Default is Listen 80 and SSL is Listen 443, set them to Listen 1.2.3.4:80 and Listen 1.2.3.4:443

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×