Default no for create initial web page

How do i set NO (be the default) for “create initial web page”?
Can’t find this option anywhere
|------------------------------|-------------------------------|
| OS type and version | AlmaLinux 8.8 |
| Webmin version | 2.202 |
| Virtualmin version | 7.20.2 |
| Webserver version | Apache version 2.4.37 |

Here

I wonder if there’s a way to set the server-wide default to NO on this option…

1 Like

Yes, i would like this radio button to be NO by default

I can’t see anything in templates, only thing I can think is use the skeleton directory to add a blank html page, not sure, maybe you can just creating a empty public_html directory.
It is wise to have something so you know the web directives are working correctly for the domain.

P.S. tested it didn’t work for a empty public_html directory, but it works if you add a empty index.html file into the skel, not sure that’s what you want though.

Yeah, if there isn’t an index.html, it’ll generate one. It’s bug-like that it can’t be set in Server Templates. I’ll ask @Ilia if that can be fixed.

Bit of a workaround run this script.

#!/bin/sh
if [ "$VIRTUALSERVER_ACTION" = "CREATE_DOMAIN" ]; then
  cd "$VIRTUALSERVER_HOME"
  rm -f public_html/index.html
fi

In the virtualmin config

2 Likes

@joe the virtualmin configuration section is called Actions upon server and user creation should these 2 options be renamed as follows?

  • Command to run before making changes to a serverCommand to run before creating a virtual server
  • Command to run after making changes to a serverCommand to run after creating a virtual server

NB: in the above, I have renamed server to virtual server and also made note that this is when the virtual server is created and not when changes are made.

Thanks

Well, I wouldn’t call it a bug since we have an explicit UI option for this. Besides, it would be tricky to make it work when a different template is chosen in the UI, as we’d need to add extra complexity to update the radios for “Create initial web page” option.

1 Like

But, it’s not just when the server is created. It is when any changes are made. Creation is one change. Deletion is another. There are several others. Check the popup help for details.

So, no, it shouldn’t change.

1 Like

No we don’t. We don’t have UI for making “No” the default. A Server Template should be able to configure a Virtual Server the way the user wants it with no manual configuration needed, and if it can’t, it’s a bug.

We don’t have it in Virtualmin GPL, but we do in Virtualmin Pro. Which version are you referring to? The OP has a Pro license.

Certainly is not!
What is the point of a system admin?
If it is not setting up a working webserver. AND testing that it WORKS!
That - or some such page - does just that (perhaps a blank page or something equally vague might do the same) - but what’s the real problem here? just load a real site or do some more work!

Oh, right, I remember that conversation. Where is the option? I couldn’t find it? I was looking at a system with Pro.

Since we provide a UI option for this (i.e., to either not display the default page, display it with the default index.html, or display it with custom content entered manually using the textbox below), it’s not configurable in the templates — at least not yet.

It’s where it’s always been:

1 Like

No! That’s not in Server Templates! That’s not setting a default. A user should be able to set it to default to No. If you want that to only be for Pro, OK (since there is a workaround), but Server Templates are for setting things up so that no configuration is needed at creation time (so it can be automated via billing systems or whatever…if you’re only offering a thing in the Create Virtual Server form, you are not targeting the kind of user that pays for software).

1 Like

Joe, yes, definitely! I agree! I’ll add it to my to-do list for the next Virtualmin release.

But first, let’s ask @Jamie for his thoughts. Jamie, are you okay with adding this to the templates under the “Website for Domain” page?

Are you creating the domain using the Virtualmin CLI or UI? And are you using Virtualmin GPL or Pro for this particular case?

I have a server template that I use. I would like to have to the option of not creating initial web content by default. Currently I have to click ‘no’ everytime.

Got it! Makes perfect sense. I’ll implement it a bit later and let you know.

2 Likes