I noticed that all the website configurations are in /etc/nginx.conf on my new Virtualmin install.
As i was used to it beeing in /etc/nginx/sites-available and sites-enabled its what i would like to have again, i did not change anything like that during the installation wizard or setup wizard so i guess its rocky or Virtualmin default now.
I allready saw that there is an option in the NGINX module configuration called: Directory for links to new virtual host files, i would guess thats where i would set /etc/nginx/sites-available ?
How would i migrate existing virtual servers / sites though?
Plenty of sites pop up in search to tell you how to implement it. Some hints 3 years ago that this is deprecated and will drop from the code and some saying it is just a distro preference.
You picked an operating system, and we respect that choice. The EL variants do not, by default, configure virtual hosts in the way they’re done on Debian/Ubuntu.
Virtualmin supports either, but we don’t alter defaults provided by your OS packages unless we have a damned good reason. So, if you want to use it like Debian/Ubuntu, you’ll have to configure it that way. That involves adding a directive to the nginx.conf to include config files from the /etc/nginx/sites-enabled directory, and configuring Virtualmin to use that for virtual host configuration files.
To “migrate”, you can probably just disable the website and SSL website for the domains, change the configuration in Virtualmin to use separate config files, and then re-enable the website and SSL website feature after. Probably. I’ve never done it, as I use whatever the OS uses.
I see, thanks a lot for the quick response.
So its on the OS side.
Is there maybe another way that I missed to edit the configurations for each virtual host from Virtualmin?
What do you mean? You can configure Virtualmin to handle virtual hosts in separate files or in one file. It doesn’t matter to Virtualmin, just tell it what you want.
i am not familiar with this also and could be useful. is it debian/ubuntu uses /etc/nginx/sites-available and alma/rocky uses a single /etc/nginx.conf file? i might switch one of my os which will have many sites and prefer to have their own config file.
I mean weather there is an option or not to edit the configuration files like as if they where separate on Virtualmin without needing to go into nginx.conf.
Because its OS default I would like to keep it that way, just thought it was something Virtualmin changed.
to my configuration for a virtual host, then i need to edit the nginx.conf and pick out the website in there or is there a way to add it through the configure nginx website screen?
You do not necessarily need to switch the OS, you can easily change the way the configuration files are handled.
I find the choice of OS should not be made based on this factor.