labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
docker exec nginx-certbot_certbot_1 certbot renew --force;
docker exec nginx-certbot_certbot_1 certbot renew
version: '3'
services:
nginx:
image: nginx:1.15-alpine
restart: unless-stopped
volumes:
- ./public_html:/public_html
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
ports:
- "80:80"
- "443:443"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
public function login(LoginRequest $request)
{
try {
if ($this->hasTooManyLoginAttempts($request)) {
$this->fireLockoutEvent($request);
$this->sendLockoutResponse($request);
}
$authenticate = Auth::attempt(
$request->only([$this->username(), 'password']),
$request->filled('remember')
);
if ($authenticate) {
$request->session()->regenerate();
$this->clearLoginAttempts($request);
$user = auth()->user();
if ($user->isWait()) {
Auth::logout();
return back()->with('error', __('messages.you_need_to_confirm_your_account_please_check_your_email'));
}
if ($user->isVerified()) {
Auth::logout();
return back()->with('error', __('messages.you_need_to_be_confirmed_by_leader_or_admin'));
}
return redirect()->intended(route('cabinet.home'));
}
$this->incrementLoginAttempts($request);
} catch (\DomainException $e) {
throw new \Exception('login error');
}
throw ValidationException::withMessages(['email' => [__('auth.failed')]]);
}
public function test_user_can_login_with_correct_credentials()
{
$this->withoutMiddleware();
$user = factory(User::class, 'customer')->create([
'password' => bcrypt($password = 'secret'),
'status' => StatusesUsersHelper::STATUS_ACTIVE
]);
$response = $this->post(route('login'), [
'email' => $user->email,
'password' => $password
]);
$response->assertRedirect(route('cabinet.home'));
$response->assertSessionHasErrors();
$this->assertAuthenticatedAs($user);
}
curl -v https://www.domen.ru
curl -v https://domen.ru
127.0.0.1 localhost www.domen.ru domen.ru
{ip_address} domen.ru
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT;
services:
nginx:
ports:
- ${HTTPS_PORT}:443 # в .env - 443 . Пробовал и хардкодом 443 вписать без .env переменной, эффект тот же самый
- ${HTTP_PORT}:80
....
curl -v https://www.domen.ru
*там где контейнер proxy , там просто собирается nginx с простым конфигом.*
А в случае, если доменов несколько, он справится? Там еще Dockefile в proxy содержится? Случайно не в нем определяются настройки для letcencrypt - домены, почта и т.д?