How to change default virtualmin 443 port

When I open in browser https://my-domain.com I get a default Virtualmin page saying " Under Construction. Domain owner may login to the control panel to manage this website"

It opens on a default Apache2 https 443 port. I would like to configure this port to another value so that I can run another application on 443 port.

I already edited /etc/webmin/virtual-server/config and changed web_sslport to another value and then /etc/init.d/webmin restart but with no effect.

Is it possible to change port of the default page and use 443 for something else?

SYSTEM INFORMATION
OS type and version Ubuntu 18.04
Webmin version 1.984
Virtualmin version 6.17-3

Please i don’t understand at all do some websearch on default or standard ports.
Webmin Virtualmin Usermin use ports 10000 and 20000 default for example

port 80 : http
port 443: https


However when you type https://domain-name.com to the browser without any port you get such a view as in the screenshot. It runs on port 443 so when I try to run my application on port 443 I get error “port is already used”

What in the world? The default page is not Virtualmin. What you’re doing is bonkers.

Just remove the default page from the public_html of the domain home.

Your web server (Apache or nginx) runs on port 443. Of course it runs on port 443.

Run your app on another port and proxy to it from your web server. Otherwise you can’t host any other sites on your system. Again, what you’re trying to do is not what you should be trying to do. You’re solving the wrong problems.

Thank you for the suggestion. I’m new in the field of server management, so possibly I’m trying to do it the wrong way.

As I understood I should leave the default port settings of the server, run my application on any port and proxy (redirect?) it from this port to my subdomain (or IP, or something else)? Can it be done in the Virtualmin panel?

Proxy, not redirect.

Server Configuration->Proxy Paths

Fill in the path you want to use for your app (e.g. /my-app, or just / if you want it on the root of the domain) in Local URL Path.

Then fill in the app server info, e.g. http://127.0.0.1:3000 for a local running on port 3000.

I recommend you not run your app directly on the public IP. Most framework app servers default to listening only on 127.0.0.1, I think, unless you tell it otherwise, but it’s worth making sure. No reason to have the app server directly accessible on the open internet when you can hide it behind a real web server.

1 Like

Thank you, I will try it. Just to make sure - should I create a new Virtual Server for each subdomain and request SSL certificates separately, or I can stick with one Virtual Server and list all subdomains in SSL section?

If it’s the same content/app, just create aliases. If it’s different content/apps, I can’t imagine how you could reasonably accomplish it without creating new virtual servers.

In the future please make new topics for new questions. This is unrelated to your initial topic.

I tried to configure proxy from port 3000 (or any other) to the main subdomain address.

Typing just / returned Missing or invalid URL error so I typed the whole addres: https://sub.domain.com. However in this form there is no information about the port number. How does Virtualmin know from which port I want to proxy app into my subdomain? I can input only Proxy to URL

Also - assuming that I want to have my app on a subdomain, should I run it on https://domain.com:3000 or rather https://sub.domain.com:3000? After all I’ll proxy it afterwards.

@patpal
JoeVirtualmin Staff

19h

Proxy, not redirect.

Server Configuration->Proxy Paths

Fill in the path you want to use for your app (e.g. /my-app, or just / if you want it on the root of the domain) in Local URL Path.

Then fill in the app server info, e.g. http://127.0.0.1:3000 for a local running on port 3000.

I recommend you not run your app directly on the public IP. Most framework app servers default to listening only on 127.0.0.1, I think, unless you tell it otherwise, but it’s worth making sure. No reason to have the app server directly accessible on the open internet when you can hide it behind a real web server.

I did not tell you to do that.

I said http://127.0.0.1:3000

That is a literal address that means port 3000 on the local server. This assumes you are running your app on local port 3000.

I think we need few more UI improvements here. I will fix that.

1 Like

Yeah, we don’t have help files on that page, and proxies are something that a lot of users are confused by (and the UI is not as helpful as it could be, to boot).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.