I
I
Igor Koch2017-03-25 20:50:44
Nginx
Igor Koch, 2017-03-25 20:50:44

Bug in the browser with ssl?

There are 2 domains, one has SSL installed
pg.whata.ninja and https://whata.ninja/
On the first one there is no ssl certificate, on the second there is,
So, after I go to the main domain, the second one (pg.whata.ninja )
starts to request ssl from the server, but if you don’t go to the main one, then everything is in order,
is it being treated with something?
whata.ninja in nginx

server {
    listen 80;
    listen [::]:80;
    server_name whata.ninja www.whata.ninja;
    return 301 https://$server_name$request_uri;
}
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    root /var/www/whata.ninja/public;
    index index.php index.html index.htm;

    server_name whata.ninja www.whata.ninja;
...

pg.whata.ninja
server {
    listen 80;
    listen [::]:80;

    root /var/www/pg.whata.ninja/public;
    index index.php index.html index.htm;

    server_name pg.whata.ninja www.pg.whata.ninja;
...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2017-03-25
@amux

The config is incomplete. You probably give HSTS ))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question