Genghis.php Single File Host
Closed this issue · 9 comments
Hello,
I am using https://github.com/bobthecow/genghis/blob/master/genghis.php
This single file to manage my mongodb, but when i add support auth=true in my mongodb.conf. It shows me error, how can i add support for authentication to this php file, please reply as soon as possible. I want to use only single file i.e genghis.php not any other source or something hosted. Since I have only genghis.php on my server.
Thanks!
You have to add auth to the server URL, e.g.:
user:pass@hostname/dbname
Where i have to add it? Any line in the php file? and what should i find for?
Also my file is located at https://mydomain.com/tools/file.php so this is what i get when i login -> http://prntscr.com/5oh6b7
I have also added a htaccess file that protects my file but the username and password are not same as the one in database.
Now isn't there a way to predefine login to mongo using php file instead of url auth as it contains some special characters too.
Not in the file at all. In the UI. Boot up Genghis, and add a server :)
BootUp Genghis? I am just hosting genghis.php file. That's all. and my mongodb.conf contains auth = true. and this is the error i am getting http://prntscr.com/5oh6b7
Please help!
Thanks! :) It finally worked :) Also do i need to add this everytime i login?
Nope. Just if you clear your cookies, or change browsers, or something.
If you want to make it permanent, you can add a GENGHIS_SERVERS
environment variable with semicolon delimited server URLs. (Do it like this if you're using Apache).
Thanks 👍 :)
No problem!