how to fix proxy squid on virtualmin (ubuntu 16,04)?

Can someone tell me what should I do to fix on “this must be done before squid can run”?
this is my picture : http://imgur.com/a/TU5w6 ; http://imgur.com/a/MaXxl . This is bug is virtualmin’s fault? after I installed virtualmin it changed like that. even how many try to fix. I try to fix like this, I take and save the original squid.conf(1) file when i’m not install virtualmin . I delete the squid.conf(2) error and re-place with file original squid.conf(1), and it become the error, become squid.conf(2) again. It say virtualmin must have cache dictionaries. How to fix it? fix that “this must be done before squid can run” , this picture: http://i.stack.imgur.com/61pnP.png
http://i.stack.imgur.com/NnQjH.png

Virtualmin does not interact with Squid, at all, but Webmin does have a module for it, as you noticed.

It’s been a long time since I’ve worked with Squid, but if I recall correctly, here’s what’s going on:

Webmin looks in the squid.conf for one or more cache_dir configuration lines. It it finds them, it checks to see if the directory is actually setup for Squid. If not, it does so.

But, if Webmin doesn’t find any cache_dir lines, maybe it checks for commented out example lines, and enables those instead. That’s questionable behavior, and while it may help some new users, I can see it leading to confusion as in your case.

All those example cache_dir lines are weird. Those shouldn’t look like that. I’m not sure why someone packaging Squid would ship examples like that.

On CentOS, it has one example cache_dir, which is /var/cache/squid (I think). That directory is created when you install Squid, and turning on Squid will init the dir. That’s sensible. The stuff in your config file isn’t sensible.

The solution is to get rid of all that /sdd and /hdd crap. That’s nonsensical, unless you really have directories with those names. The only sensible looking one is /var/spool/squid. That directory probably already exists (it’s probably included in the Squid package).

You’d want one cache_dir line, you’d want that one directory to exist and be writable by the squid user (whatever user that is, maybe squid:squid or squid:nobody), and you’d want it to no be commented out in the Squid configuration file (no ‘#’ in front of it). I’d all those sdd and hdd cache_dir lines, as they’re silly.

Note that it’s probably a bug that Webmin tried to enable all of those. Or, rather an overambitious desire to help users who don’t know how Squid is configured to get started quickly…assuming that distros wouldn’t ship an example with weird non-sensical example cache_dir lines.