Jump to content

Hosting application and website on the same port

Schotsl

Hello,

 

I host a website on my server on port 80 but now I also want to run my processing sketch, I've been told that I would have to run the sketch on port 80 so most networks dont block it (like my school network). Now I know you can host multiple websites on the same port and ip but is it possible to host a website and a other application on the same port and ip?

Link to comment
Share on other sites

Link to post
Share on other sites

Short answer: no.

 

If the other application is web (HTTP) based you could try doing something with virtual hosts and proxy passthrough on the web server.

 

Port 443 (TLS/SSL/HTTPS) is often unblocked as well, you could try using that for the other application.

Main Linux rig: HP Elitebook 2560P (i5-2410M, 8 GB, Pop! OS)

Living room/couch gaming rig: AMD 5800X, Asus TUF Radeon 6900 XT, 32 GB, 65" LG C1 OLED

Home server and internet gateway: Dell Optiplex 3040 MFF (i5-6500T, 16 GB, Ubuntu Server 22.04 LTS)

Phone: Asus Zenfone 10

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Just.Oblivious said:

Short answer: no.

 

If the other application is web (HTTP) based you could try doing something with virtual hosts and proxy passthrough on the web server.

 

Port 443 (TLS/SSL/HTTPS) is often unblocked as well, you could try using that for the other application.

Oh, the application isnt web based (it runs locally with java). So would using port 443 be the only other solution?

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, Schotsl said:

Oh, the application isnt web based (it runs locally with java). So would using port 443 be the only other solution?

You could try setting up conditional port forwarding rules (If the source address is the IP address of the school, forward port 80 to 1234 on the server, otherwise forward port 80 to 80).

 

It's a terrible way of doing things, but it might just work :) 

 

So yeah, using another port is the best way to go.

Main Linux rig: HP Elitebook 2560P (i5-2410M, 8 GB, Pop! OS)

Living room/couch gaming rig: AMD 5800X, Asus TUF Radeon 6900 XT, 32 GB, 65" LG C1 OLED

Home server and internet gateway: Dell Optiplex 3040 MFF (i5-6500T, 16 GB, Ubuntu Server 22.04 LTS)

Phone: Asus Zenfone 10

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

×