Virtual servers without access

OS type and version Rocky Linux 8.6
Webmin version 2.105
Virtualmin version 7.10.0
Related packages Python

Hello, I had five virtual servers running fine. In the httpd.conf I have changed the line

Listen 80

along the lines

Listen 80
Listen 8000

I have restarted Apache and can no longer access any of the virtual servers.

I have turned the server off and on, and it’s still the same. Can I restore services somehow? Thank you!

Sorry why are you doing this? Client browsers use port 80. What about https?
you can’t see the site using http://site.address:8000?
If your sure you want this then have you opened the firewall to that port.

To restore listen on port 80.

I couldn’t see port 8000 over https.
Viewing this Apache document:

I edited the httpd.conf file and modified the line that I indicated. I have restarted the Apache server, and nothing. And I have turned the server off and on and nothing.

But why would you do it, virtualmin configures everything for you to run Virtual Servers. You should not be playing with Global settings.
https is port 443 http is port 80, that how it should be. Not port 8000. The docs is giving you example if you want port 8000 that doesn’t mean you should change it to that unless you have a reason. The firewall is not open to port 8000 so it would be blocked.

I feel like this is an XY problem XY problem - Wikipedia

It’s not clear why you’re trying to put Apache on 8000. That’s a pretty (extremely) unusual thing to do, so I have to assume you’re actually trying to accomplish something else and have decided putting Apache on port 8000 is a way to solve it. But, I can’t imagine what that “something else” is.

If you need to host other sites in Apache, you would normally give them another name not another port. That’s the point of virtual hosting and of Virtualmin.

To be clear, you could make Apache listen on port 8000. But, since it almost never makes sense to do so, I think the fastest way to solving your problem is actually starting with what you’re trying to accomplish and not what you tried (unsuccessfully) to achieve it.

It is clear that I made a serious mistake when adding the line

Listen 8000

to the httpd.conf file. The fact is that now nothing works.

Can you help me solve the problem?
Thank you.

I assume you undid the change you made and restarted the httpd service?

If so, and it doesn’t start, then you presumably made other changes you didn’t undo, or made some syntax errors in the file somewhere. You’ll need to look at the log or the journal (or both).

There’s an error_log in /var/log/httpd, and to look at the journal journalctl -fu httpd. Watch those while you restart the httpd service, and see what happens. That’ll tell you why it won’t start.

1 Like

Joe, that’s how I was able to find the error. Line 798. A letter (the ‘n’) that at some point “has slipped in” :frowning:

And in http.conf:

Thank you very much, I have learned a lot!

This is what I was trying:


I think people usual use proxy path settings to do that the virtualmin. I have no experience in doing that, but there is discussion of it in the forum.

1 Like

You’re going backward.

Apache does not listen on an alternate port for that. Apache proxies from the usual ports to a local alternative port (but a file socket is better/safer than a local port, particularly on a shared hosting system).

That’s a new question completely unrelated to putting Apache on alternate ports, so make a new topic with your question (if you have questions not answered by the many discussions of proxying to app servers in the forums and on the internet). What you’re trying to do is proxy to an application server running on a local port (or file socket). And, that’s going to look exactly like the documentation for your web application suggests you do, because Virtualmin is just configuring Apache (or nginx) and proxy rules work the same in Virtualmin as anywhere else running Apache (or nginx).

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