The command is fine. All you need to take care is dbPath and logPath:
The first command you used is correct, just make sure you have the directory /data/db and /data/log created and
vagrant user can access it.
Directory: /data/db and ~/data/db is not same. The directories starting from slash are standard subdirectory of the root directory. You need to enable access by using command:
chown vagrant:vagrant /data/db
This command means completely different.
For any log files and error, please remove
--fork option from mongod command and the error will be printed on the command line.