403 error on new virtual server

Hello, I would like to ask for help. There is a Virtualmin server (7.9.0) with some virtual servers that work. Recently, however, the index.html (or index.php) file of the newly created servers is running with a 403 error. (Forbidden You don’t have permission to access this resource. Apache/2.4.58 (Ubuntu) Server at www.xxx.hu Port 443)

Unfortunately, I can’t link it to a specific event, since the new servers are not being created well. It is certain that in the meantime I updated all subsystems, now everything is up to date.

The permissions of the public_html folder are good (755), index.html is also good (644).
The virtual server template has not changed, I create the new server in the same way as before. There is plenty of storage space and resources.
There is no .htaccess file in the public_html folder (neither on the other servers).
If I use the site preview function, I still get the same error (403 Forbidden).
I get this even if the domain name is already directed to the server, even if it is not yet, and I would only use the site preview function.

Since this problem, the Let’s Encrypt SSL request does not work either.

I’m at a complete loss, according to the descriptions I’ve found so far, everything is fine, everything should work.
Please help me.

SYSTEM INFORMATION
OS type and version Ubuntu 22.04.3 LTS
Virtualmin version 7.9.0

That will have an error message. It is always easily resolved once we know the error message which will also indicate what is causing the poblem.

Your 403 sounds like it is very specific to something you have installed on your webserver. WordPress by any chance? but could be related to not having SSL (your Lets Encrypt cert)

I assume you can log in as Virtualmin Admin on port 10000 ?

Yes, I can login on port 10000. Sites that have already been created are working. If there is no domain pointed to the hosting, it won’t work either. For testing purposes, there is a plain index.html only in the public_html directory.
There is no CMS or any system installed on the site.
Thanks for trying to help!

I found the basic problem. Apache exists on the server as the ‘www-data’ user, which is a member of the ‘www-data’ group. Apache (with the www-data user) was assigned to the previously created repositories. In the case of the virtual server just created, this did not happen.
The first part of the solution is to assign the www-data user to the virtual server user (‘xxx.com’) group:
sudo usermod -a -G 'xxx' www-data

In this way, Apache can access the public_html folder and serve the browser.

However, Let’s Encrypt still does not run, the following error message appears:
Web-based validation failed:
/ has ‘other’ write 40777
DNS-based validation failed:
/ has ‘other’ write 40777

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