Submitted by sriz786 on Wed, 07/27/2011 - 05:54
Hi,
I try to change Webmin so it can run under apache (http://www.webmin.com/apache.html). But I got this error:
Can't locate WebminCore.pm 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 ?
Thanks
Status:
Closed (fixed)
Comments
Submitted by andreychek on Wed, 07/27/2011 - 10:59 Comment #1
Howdy -- when installing Webmin as a "package", such as via apt-get or using the Virtualmin install.sh 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.
Submitted by JamieCameron on Wed, 07/27/2011 - 13:01 Comment #2
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
Submitted by sriz786 on Wed, 07/27/2011 - 17:46 Comment #3
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.
Submitted by JamieCameron on Wed, 07/27/2011 - 17:52 Comment #4
Are you running just Webmin, or Virtualmin too?
You should be able to just revert the steps in which you changed config files..
Submitted by sriz786 on Wed, 07/27/2011 - 18:15 Comment #5
I think both, I'm using Virtualmin Pro.
Submitted by andreychek on Wed, 07/27/2011 - 18:23 Comment #6
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".
Submitted by andreychek on Thu, 07/28/2011 - 00:02 Comment #9
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!
Submitted by andreychek on Thu, 07/28/2011 - 00:04 Comment #10
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.
Submitted by sriz786 on Thu, 07/28/2011 - 02:24 Comment #11
I mess up with miniserv.conf where can I find default one ? I'm using virtualmin pro.
Submitted by andreychek on Thu, 07/28/2011 - 10:36 Comment #12
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.
Submitted by sriz786 on Thu, 07/28/2011 - 18:50 Comment #13
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?
Submitted by andreychek on Thu, 07/28/2011 - 19:39 Comment #14
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.
Submitted by sriz786 on Thu, 07/28/2011 - 19:56 Comment #15
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.
Submitted by andreychek on Thu, 07/28/2011 - 20:40 Comment #16
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.
Submitted by sriz786 on Fri, 07/29/2011 - 02:15 Comment #17
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 perlpath.pl "/usr/bin/perl -U" -).
What should I do to fix this ?
Submitted by andreychek on Fri, 07/29/2011 - 10:17 Comment #18
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 eric@virtualmin.com.
I can then troubleshoot what the problem is, and we'll get your issue fixed up.
Submitted by sriz786 on Fri, 07/29/2011 - 19:33 Comment #19
Ok. I will email our root login through support@host.ablecommunity.com with subject "Can't locate WebminCore.pm Issues"
Thank you.
Submitted by andreychek on Sat, 07/30/2011 - 09:18 Comment #20
Just a heads up that we are looking into this, and are working out a way to make your installation work correctly again.
Submitted by sriz786 on Sat, 07/30/2011 - 20:59 Comment #21
Any update?
Submitted by JamieCameron on Sat, 07/30/2011 - 21:16 Comment #22
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.
Submitted by sriz786 on Sat, 07/30/2011 - 23:16 Comment #23
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 ?
Submitted by JamieCameron on Sat, 07/30/2011 - 23:54 Comment #24
The -U flag is harmless, and the second ocurrance is just ignored..
Submitted by sriz786 on Sun, 07/31/2011 - 00:09 Comment #25
Ok. Great. Thanks again.