Advise with install scripts

Just a quick question regarding the install scripts.
When installing them is it better to keep the default "install in sub directory of public_html" or reselect "top level".

Have installed a couple on a test server and had no problems, but with Joomla as its not installed to ITS default directory ( as per Joomla ), I have had some redirect problems, and setting up. And with some extensions/modules not loading correctly.

Not displaying correctly the web site and having to have /joomla at the end of the site address to display anything is a bit of a pain.

Just wondered, any thoughts?

i have several joomla installs on my server, all in the top-level and they work fine.
Per haps this is a .htaccess issue and some bugs in specific extensions (openSef for instance).

Normally one would put only 1 script directly in the public_html and any others in a subdirectory, like a forum, helpdesk etc.

Joomla is meant to run in the top-level.

Ah let me get this right then. Top level means the root of that virtual server, not the doc root. This can all be very confusing sometimes.

When Virtualmin installs these scripts it gives you the option of install sub_directory under public_html [] At top level [] "app name"

When selecting top level during install an advisory displays warning that other files are installed here already and if uninstalled will be deleted also.

Just checking before I do something terminal. If I select top level it will be installed in the virtual server root and not doc root for that server " /public_html"

Yes it was .htaccess i think, as per question posted in joomla forum, but still couldnt get problem to resolve.

In the script install for joomla the htaccess file is commented out with .txt even when altered to the right file format I was still getting errors displaying on the page and error 500 regularly. Although I have reset php back to cgi and not fcid, that might have had something to do with it.

I guess I am just looking for some direction before installing again, wether to select the first radio button and not leaving it with the default that Virtualmin gives, the second button?

Thanks for the reply ronald

Now I am even more confused than before. If I select the "first button" the installation says that it will install in sub folder /home/xxxxxxxxxxxxx/public_html/joomla, and to warn that other files exist and will be deleted if joomla is deleted. If I just leave it at what Virtualmin defaults to "the second button" and joomla entered in the dialog box, it installs to the same place anyway. Whats the difference? Surely,
/home/xxxxxxxxxxxx/public_html/joomla and
/home/xxxxxxxxxxxx/public_html/joomla are the same thing, I cant see the difference?

As for .htaccess, there was only default showing, no 3rd party section. I tried the codes given in the forum(joomla) but no good, unless I typed someting wrong?

Sorry for being a bit of a dumb arse ronald, and thanks for that code will give it a try.

Um its late, a good nights sleep is required and perhaps with a clear head, I might be able to sail thru this.

You’re not being dumb. If Joomla doesn’t work after installation into /joomla or / then it’s a bug that needs to be fixed. File a ticket in the tracker with the details of what doesn’t work.

Of course, if you’re installing additional Joomla modules that tinker with paths, all bets are off, and you’ll have to get the configuration of those additional modules right yourself.

Our Joomla installation here at is installed into the document root (/home/virtualmin/public_html). All of the other applications we have installed (just Flyspray, I think, as Dokuwiki was part of the Joomla component/bridge) are in sub-directories. This is risky, if you plan to ever uninstall the application–Virtualmin doesn’t know everything about the application, and everything that you add to the application later (such as plugins or whatever), and so when you uninstall an application, it deletes everything in the directory that has the application. If that’s the document root, it’ll delete everything, including any non-app data. This is mildly bug-like, but the only solution is to build a full-featured package manager, which is a dramatically more complex task than the value it would provide (RPM and dpkg, for example, took years to develop). We will continue to refine the uninstall aspect of things…and make the Install Scripts data more comprehensive, gradually. But don’t expect major changes to this particular behavior anytime soon, as it so rarely effects folks…except those who are tinkering with their site, which means they don’t mind starting over each time they try a new app.

Anyway, it’s also possible to install into /joomla and use a proxy rule to forward over to the app, but that’s probably more trouble than it’s worth.

I would suggest you make it the root app, and only install things that you plan to be part of the same site (e.g. bridged into Joomla) in subdirectories of that. Any apps that you also want, but won’t be bridging in, create a new sub-server with a different domain (e.g. if I didn’t care about all of our apps sharing a login and session, I could do something like and ) and install them there. This solves all of the problems with mingling apps. (It does introduce some new problems with cacheability of resources, if your site is really heavy and design elements and JavaScript are the same for all sites.)

Thanks Joe, yeah I want to keep it as simple as possible, I aint no pc expert. This is just to get a couple of community web sites going. They will be extinct before I finish ha ha.

It was the install paths that were confusing me.

On the script installation options page it jives you the option:
Install sub-directory under public_html [] At top level [] "text box" with joomla already in there.

I take it the first button is to install into a sub directory and the second is to top level. Even when I leave it at the second button it installs in …/public_html/joomla
Thats the bit that confuses me, they are one and the same arent they. I mean they both go into …/public_html
I haven’t tried the first button option, to see were it goes, because of the deletion warning.

Righto, have re-installed and seems to be ok, well pages are being displayed anyway. Even tho different. I glad I not in the IT business, I wouldn’t last very long and definately wouldn’t become the next Bill Gates ha ha.

try the image again :confused:

Thank you ronald for the supplied images, that does make it clearer.

My configuration.php is identical, except the joomla core SEF bit is at the bottom. That wont make any difference, I suspect?

I did put that first little script you posted, in there, but it didnt make any difference. I am presuming that goes in the default web root as the .htaccess

Now for main concern, well the bit i am pondering anyway. The actual installation

If I select at top level, the install will go into the root of the virtual server and not my main root of the server. My worry is to put something into the main root and bugger something up and not be able to recover and end up doing an umpteenth re-install.

What I am aiming for is 3 seperate web sites hosted on individual virtual servers within my own server. Have set those up using Virtualmin. All three are live and working indepentantly.

Now I want to load all the apps to those individual virtual servers for the web sites to be constructed and viewable, with there own independant apps

If I select top level for each script install on each virtual server it is going to be for that server only? and not the main machine.

Bear with me ronald, as you might have guessed I aint no linux/web guru. But am learning, mainly the hard way, crashing and burning alot.

I appreciate the help

Cant edit so will do here.

That wasnt the configuration.php shown, sorry, I choose the wrong file name, its the .htaccess and yes the same as yours ronald

If I select top level for each script install on each virtual server it is going to be for that server only? and not the main machine.

Now I see why you’ve been sounding so concerned all this time. I couldn’t figure out what was triggering your anxiety. :wink:

Yes, Install Scripts install into virtual servers. Virtualmin can’t think about problems any other way. (i.e. Virtualmin is not designed to operate on “default” websites or “system-wide” installations of things…though it can be made to do useful instances of that sort of work, if you try…but it won’t do anything by accident.)

If I select at top level, the install will go into the root of the virtual server and not my main root of the server.
Im not sure what your confusion is here.

you create a domain.
it creates: /home/
to be visible to the outsideworld your joomla goes in /home/ (top level)

the same for

through the install script module Joomla will never be installed outside the public folder for that domain, only "deeper" like /home/

you must login as the virtual server owner, i.e. and then install joomla

the .htaccess I posted is the original joomla file.
read the orange comments, if you have trouble somehow you can comment some rules out

You can also disable sef in joomla backend and see if it then runs fine. if not, disable non-core extensions and enable 1 by 1 to see which one causes trouble.

thanks ronald it was just the term root which was putting me off. You have convinced me. Will reinstall in the top level tomorrow. It was the "if you delete at a later time" thing that was putting me off.


Right I am going to do this.

Only thing is scipt installation is not available for each virtual server, I can only install into each one via the main Virtualmin login and selecting by each one from the drop down menu at the top left.

There is no option "install scripts" on the admin page for the domain of the individual virtual server.

So will install via the master to that domain.

Only thing is scipt installation is not available for each virtual server, I can only install into each one via the main Virtualmin login and selecting by each one from the drop down menu at the top left.

This behavior is configurable (as all things in Virtualmin are). If you want to allow virtual server owners to install scripts (I think most folks do, but the defaults are based on principle of least necessary privilege, on the assumption that it’s better to err on the side of too little than too much). Just look in the Edit Owner Limits page in the Administrative Options menu.

In the "Allowed capabilities and features" section check the box labeled "Can install scripts". This can be set automatically for new virtual servers in the Server Templates (once again, as nearly everything in Virtualmin can be).

Oh, and I guess I didn’t make it clear:

It doesn’t matter if you’re logged in as the “root” level user, or the virtual server owner. Everything you do in the virtual server menu (that’s the section above the line followed by System Settings, and ending with Logs and Reports) is done the exact same way as it would be if the virtual servcer owner had that menu item and used it themself–again we’re back to the basic model of Virtualmin. It isn’t possible to manage non-virtual servers in Virtualmin. e.g., you can’t install a script in some non-virtual server location using Virtualmin. It has no idea about things that aren’t virtual servers.*

When you select a virtual server in the dropdown list and install a script, the script is installed just as it would be as the owner of the virtual server, and assuming suexec is enabled (as we always recommend), it’ll actually be owned by the owner of the virtual server. Virtualmin is all about virtual servers–the notion that it could do otherwise is tripping up your understanding of what Virtualmin is going to do when you click on stuff. :wink:

  • (a note on the above comment about what you can’t do in Virtualmin)- While you can’t install anything into a non-virtual server type Apache host, you can, and many people do, setup “system-wide” applications using Virtualmin and a ProxyPass rule or two, or just a single domain for those “system-wide” applications. SquirrelMail is one such app that commonly gets setup that way for webmail, because some folks find Usermin unfamiliar and prefer something better known. And that’s OK–works fine, is easy to do, and doesn’t go against anything I’ve said above. It’s still installed a virtual server.

ah ok then will continue then.
Tried having a look around to see if I could enable some setting somewhere to have script install available under each virtual admin login, but couldn’t.

Here goes, deep breath and…

Well I think we can put that little baby to bed now, I can see the difference top level install has made. And yes my temp index.html comes up now in the preview and not the default joomla one so something has worked haha.

All I need to do now is get something meaningfull up and going on there!!

Just wondering why, a forum persay goes into a sub folder? So it doesnt get root access maybe?

Thank you guys for steering me thru my little dilema

a forum doesn’t go per se into a subdirectory.
If you like you can put it at top level.

commonly used is a website (homemade or cms-like) at the top level as that is the presentation of whatever meaningful stuff you do and a link in the menu to a forum.

In that case you must put a forum in a subdirectory as no two scripts can co-exist in a folder. Often 2 scripts both have an index.php and a folder images, you see the bottleneck there …

If all you have is a forum, then put it in top level so it can be called in a browser by the domain name …

However you do it, root access has nothing to do with it.

if you don't know what you're doing I suggest to find out what you need, before actually doing it. One never knows what damage could be done otherwise.

Would be a good thing to set up an old computer (or dual boot on your PC) as a development server so you can test before doing it at the production server. Most sysadmins do this.

It doesn't matter if you're logged in as the "root" level user, or the virtual server owner.

to install scripts it doesn’t matter however in my opinion it is generally always best practice to not log in as root if it isn’t absolutely necessary or if you absolutely make no fatal mistakes.