MongoDB authorization
By default, the self-hosted version of Passwork does not use authorization to connect with the MongoDB. You can enable and configure authorization in MongoDB for increased security.
Open a command line and execute:
Create a user with the commands:
user— login pwd — password Do not use the following characters in user password @, :, # because this can lead to application failures.
If you are using a MongoDB replica set, you should also add the cluster manager role to this user:
Depending on your operating system and database version, the configuration file may be located:
- mongod.conf
- mongod.cfg
- mongodb.conf
For Linux: this file is usually located in the directory /etc/ Fpr Windows: check MongoDB installation folder. You can find the path to the configuration file with the following commands.
Open the configuration file and add the line:
Save the file and restart MongoDB.
Open <passwork>/app/config.ini.Find connectionString:
and change to:
Save the file and refresh the page in the browser with Passwork.
• Passwork stopped working correctly after the described actions • the page displays the string {"response":false}
Check the Passwork log files that are in <passwork>/app/logs/.If you see these lines:
The most likely problem is that you have installed the old PHP extension mongo. Open the browser page http://your_passwork/check.php - version mongo should be 1.6.
Try the following. Open the MongoDB configuration file, comment out or delete the line:
Save the file and reload MongoDB. Open the command line:
Then return the line:
Save the file and reload MongoDB.
Check if Passwork works appropriately.
If you still see problems send the following information to info@passwork.me:
- screenshot of the page http://your_passwork/check.php
- screenshot of the config file <passwork>/app/config.ini.
- last log file from <passwork>/app/logs /
- screenshot of MongoDB config file
- PHP log file