My suggestion is to solve that using something that’s not userdir
Using userdir prevents the CGI and FCGID modes from working properly.
There’s other ways to handle what you’re after though – check out the section named “How do I make domains available before the DNS changes are made at the registrar?” in this document:
In particular – I’d suggest setting up the aliases, or the Preview Website option.
If you want to use userdir. I believe that would only work if you’re setup with mod_php. However, check out that document, and let us know if that does the trick
The preview website option is really handy and works fine but its inconvenient for clients and remote testing.
The userdir security issue is not a problem for me because I can easily exclude the few administration user accounts on the server from userdir access.
The alias facility would be good but:
“You can do that by going into System Settings -> Server Templates -> Default Template -> Virtual Server Creation, and adding your primary domain in “Automatically create alias domain”.”
There is no “Virtual Server Creation” option anywhere under the default template setting in my version (3.82.gpl)
Even if there was the necessary option present to make the creation of an alias the default action, I need to make aliases for existing folders (which I might be able to work out by looking at the configs after making a test alias using the template but as I can’t do that anyway…)
Finally, using the FAQ and following the exact instructions for enabling userdir just gave me 404 not found errors for the url whether pointing at html files or php files which lead me to trying to roll my own solution as above… which almost works (at least it gets at the html).
So I am afraid I am still stuck with this. My workaround at present is to keep a spare IP handy and point it at whichever site I’m testing but that is not good for a host of reasons.
Yeah, that alias feature was recently added to Virtualmin, I don’t believe it’s in 3.82.
However, it’s not doing anything particularly unusual – you could just manually create an alias for any Virtual Servers you have that you want to be able to access.
I’ve used the alias feature for alternate domain names but here I’m trying to do something a bit different:
I need the alias for the domain to be a simple url using the existing host. For example:
I might have mybiz.com as the main server (and default site) and I need an alias for an upcoming site that will one day be newsite.com. newsite.com dns cannot be set up yet (e.g. because there is an existing site that is going to be migrated to the new one) but its added as a virtual server and now I and my client needs to test it with a convenient URL.