Question:
How to enable maintenance mode in Magento 2?
Sample Answer:
Maintenance mode can be enabled by executing the following CLI command from the Magento 2 root directory:
php bin/magento maintenance:enable
To allow the site only for specific IPs:
php bin/magento maintenance:enable --ip=192.0.0.1 --ip=192.0.0.2