The following is my solution for creating a multi-user mint installation. Keep in mind that in order to do this, you should have knowledge of PHP, htaccess, and Apache configuration. I’ll try to walk you through a lot of the configuration but your configuration will vary.
I’d like to thank Shaun once again for creating such an awesome codebase to make this solution so simple. Thanks Shaun! :)
Two things before you try this solution: (1) Read the whole walkthrough before trying it. (2) Don’t ask me to post code samples as doing so would be a violation of the Mint license.
Caveats
- This will break the auto-update system due to the
Mint Locationsetting not being the actual location of the core.
File/Folder Changes
- Move your mint installation to a sub-directory of the mint folder and call it
panel, so you get a structure like this:http://www.example.com/mint/panel/ - Copy
mint/panel/index.phptomint/index.phpand make the following changes to it.- Change the
MINT_ROOTtodirname(__FILE__).'/panel/' - Add
if (!isset($_GET['js']) && !isset($_GET['record'])) header('Location: panel/');right before whereMINTis defined.
- Change the
This basically creates an entry point for all users but restricts the entry point to &js and &record requests. All other requests are routed to the panel/ where you can see your stats.
Do NOT change your javascript code to /mint/panel/?js. It should be /mint/?js
Mint Changes
- Run the
?movedquery at/mint/panel/to let Mint readjust. - Log-in and make sure
Mint Locationis set tohttp://www.example.com/mint/(it shouldn’t havepanel/at the end of it)
Password protecting
You are now free to password protect the panel/ folder without adversely affecting your stats gathering. I’ve been using this solution for almost a week without problems.
You can secure the folder using htaccess authentication. There are dozens of tutorials around the web about this.