froxlor / Froxlor

The server administration software for your needs - The official Froxlor development Git repository
http://www.froxlor.org
GNU General Public License v2.0
1.63k stars 458 forks source link

Different port than port 80 for webserver #1191

Closed lonesomewalker closed 1 year ago

lonesomewalker commented 1 year ago

Describe the bug A domain should be able to setup WITHOUT port 80.

System information

To Reproduce Steps to reproduce the behavior:

  1. create new ip/port, is this SSL -> yes (here the annoying part about ssl certificate starts... but is doable)
  2. set up new domain
  3. it is mandatory to have the domain with port 80, not possible to have it for example at 8443

Expected behavior It should be independent from port 80 to register a new domain in the system. Apache does not care :-)

lonesomewalker commented 1 year ago

After creating a fake port which is not port 80, this works.

lonesomewalker commented 1 year ago

Additionally: The server-hostname cannot be used as customer-domain. Well... this is somewhat... annoying :-)

d00p commented 1 year ago

So the issue is that you want SSL only domains because having a different port than 80 is possible of course.

The server-hostname cannot be used as customer-domain.

Well, you can use e.g. "froxlor.domain.tld" for froxlor and still assign "domain.tld" for a customer. Assigning the same domain definitely makes no sense ..

lonesomewalker commented 1 year ago

Well... It makes sense in case of different ports... ;-) You have kinda unlimited possibilities for Apache/nginx as a proxy. So, yes, it would be nice to have domains which are SSL only, running on a different port. And yes, i know, this is an edge-case :D But i wanted to run an additional service on the hostname with a different port. (let me guess, easier done with a seperate config file for the webserver...)

d00p commented 1 year ago

So we have two things here:

1) The possibility to have ssl-only domains (this could be done, but it will take some time as this requires a lot of rework)

2) Having a separate service run on froxlor-hostname:[some-other-port]

The latter can easily achieved by e.g. specifying a proxypass directive for a specific folder or similar in the ip/port special-settings config:

Let's assume you have some service running on port 8080 and you want it to be accessible using the froxlor-hostname e.g. via https://froxlor.mydomain.tld/special-service

ProxyPreserveHost on
ProxyPass "/special-service" "http://localhost:8080"
ProxyPassReverse "/special-service" "http://locahost:8080"

In case you explicitly want the service to be accessible via http://froxlor.mydomain.tld:8080 you would need to create your own/custom virtual-host configuration as froxlor itself would only let it point to froxlor itself (in case of froxlor-hostname) or the customer-homedirectory (in case of customerdomain) and would even lead to the issue that your webserver wont't be able to start/restart because the port 8080 is already in use by the corresponding service hence it wont be able to listen on it

lonesomewalker commented 1 year ago

Okay, then i will use the typical approach: separate config file. Good that froxlor allows this to the server admins :-)