Can't locate


I try to change Webmin so it can run under apache ( But I got this error:

Can't locate in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl ..) at /usr/share/webmin/index.cgi line 5.

I've searched webmincore and it is exist under /usr/share/webmin. Any ideas why ?


Closed (fixed)


Howdy -- when installing Webmin as a "package", such as via apt-get or using the Virtualmin script -- the installation location of Webmin would be in the directory "/usr/share/webmin".

So in step 4 of those instructions, where it has you set a number of "SetEnv" lines, the one with "SERVER_ROOT" would need to look like this:

SetEnv SERVER_ROOT /usr/share/webmin

Likewise, any other references you see to "/usr/local/webmin" in the instructions you were following -- you'd want to use "/usr/share/webmin" in it's place, as that's your installation location.

However, note that we'd suggest using Webmin's default of running it's own web server on port 10000.

If you're using Virtualmin -- I'm not sure that Virtualmin itself would work under that environment, for two reasons.

First, the instructions have you change the theme to "Old Webmin Theme" since normal Webmin theming doesn't work properly... since that is the only theme that works, that means you couldn't use Virtualmin's Framed Theme, so your Virtualmin functionality wouldn't be present.

Second, since Virtualmin needs to restart Apache during configuration of some items, that may cause it to get knocked offline in the middle of it's setup, leaving some things partially-configured or broken.

Jamie could speak to all that better than myself, but if you are indeed using Virtualmin, I'm not sure that's going to work for you.

I would strongly recommend against running Webmin under Apache - there is NO benefit, unless you are on some system with tiny memory. It will be slower, have a worse UI, lose features and will consume just as much peak memory.

However, if you really really want to do this, make sure the PERLLIB environment variable is set in Apache to /usr/share/webmin

I see. Well, if there is no benefit, then what should I do to get it back ? Because almost all steps already done.

So, are there any configurations for the webmin, so it can run faster or not consume too much memory ? Our clients complain if their websites running slow.

Are you running just Webmin, or Virtualmin too?

You should be able to just revert the steps in which you changed config files..

I think both, I'm using Virtualmin Pro.

Yeah, it should just be a matter of removing the changes you had added. Then, so long as you're accessing Webmin/Virtualmin on port 10000, you're using the original built-in web server.

If you changed the Webmin theme to the "Old Webmin Theme", you may need to go back into Webmin and change that back to the "Virtualmin Framed Theme".

You should be able to continue even with that change. All it did is pass in an additional option, and Webmin/Virtualmin will continue to work with that set.

If you can access Webmin/Virtualmin on port 10000, you should be in good shape!

chown -R root:root /usr/local/webmin chmod -R 6755 /usr/local/webmin

If you ran that command exactly as it's written above, and didn't run that on /usr/share/webmin -- it wouldn't have actually affected your Webmin installation. You wouldn't need to make any changes to undo that.

I mess up with miniserv.conf where can I find default one ? I'm using virtualmin pro.

Well, if you let us know what's not working, we may be able to help.

However, I've attached a typical miniserv.conf file as would be found on Ubuntu 10.04.

The only different is "root=/usr/share/webmin", should I add this to my miniserv.conf ?

I have not add "root=/usr/share/webmin" and try to start webmin and is up but I lost virtualmin menu. See attached. What should I do ?

And there is /usr/share/usermin, should I start this too or this already start when webmin start?

Did you change the theme back to "Virtualmin Framed Theme"?

You can do that by going into Webmin -> Change Language and Theme.

As far as Usermin goes -- that would be started by default unless you had disabled it.

I did change the theme back to "Virtualmin Framed Theme". It happens when button on top something like "Detect os change" clicked then virtualmin menu gone.

Hmm, well, you may want to try setting "root=/usr/share/webmin" in your miniserv.conf file, and then restarting Webmin with "/etc/init.d/webmin restart".

If that doesn't solve your problem, we may need to perform some additional troubleshooting to see what's wrong.

I look some .cgi under /usr/share/webmin on top I see "#!/usr/bin/perl -U -U". I think I did this command twice (find . -name ".cgi" -o -name "*.pl" | perl "/usr/bin/perl -U" -).

What should I do to fix this ?

Hmm, I'm not really sure what's going on there. I think that in order to resolve that issue, I may need to log into your server and look around a bit.

If that's okay, you can either enable Remote Support using Virtualmin's Remote Support module (assuming you're able to access it) -- or, you can email your root login details to

I can then troubleshoot what the problem is, and we'll get your issue fixed up.

Just a heads up that we are looking into this, and are working out a way to make your installation work correctly again.

Ok, I fixed the issue - Virtualmin hadn't detected your OS properly due to the changes you made, and so didn't think that VIrtualmin was supported on your OS. I fixed this at Webmin -> Webmin Configuration -> Operating System and Environment, and it looks OK now.

Great! Thanks.

But, I see some of them have tag -U twice in *.cgi and *.pl (#!/usr/bin/perl -U -U) ? Any effects in the future ? Not run properly perhaps ?

The -U flag is harmless, and the second ocurrance is just ignored..