.maintenance.flag is working fine but when I want to exempt my own machine ip, put the .maintenance.ip file in var with remote ip it's not working.
@inborntech thank you for reporting, we have created MAGETWO-52040 to investigate and fix.
Hi @inborntech
I wasn't able to reproduce this bug on latest develop branch with command like
php bin/magento maintenance:enable --ip=127.0.0.1
If you still can reproduce it or has additional info-please reopen current issue.
Closed.
Found the same issue.
Server config: SSL + Nginx + Varnish (that works as proxy for https/http)
Seems that this code doesn't allow all possible scenarios like proxy (HTTP_X_FORWARDED_FOR).
vendor/magento/framework/App/Bootstrap.php
/** @var \Magento\Framework\App\MaintenanceMode $maintenance */
$this->maintenance = $this->objectManager->get('Magento\Framework\App\MaintenanceMode');
$isOn = $this->maintenance->isOn(isset($this->server['REMOTE_ADDR']) ? $this->server['REMOTE_ADDR'] : '');
@vkosenok please do not post on closed issues.
I know we should post on closed issues but i im experiencing the same issue as vkosenok, and i have pretty similar configuration SSL + Nginx + Varnish (that works as proxy for https/http) , Any solution?.
Sorry for the incovenience.
You can configure Nginx in order to add the real IP when there is Varnish
set_real_ip_from 127.0.0.1; #Put the Ip of your varnish/proxy here
real_ip_header X-Forwarded-For; #Put the Header that your varnish/proxy set
But I do not find a solution yet in order not to cache Varnish page for allowed IPs.
Most helpful comment
Found the same issue.
Server config: SSL + Nginx + Varnish (that works as proxy for https/http)
Seems that this code doesn't allow all possible scenarios like proxy (HTTP_X_FORWARDED_FOR).