Откуда у Similar Web данные (довольно точные) о посещениях моего сайта, например?
server_name old.example.com;
в последний конфиг.listen 443 ssl http2;
server_name old.example.com;
include snippets/ssl-example.com.conf;
include snippets/ssl-params.conf;
$ nano /etc/hosts
127.0.0.1 localhost
127.0.1.1 user-UBUNTU
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 domain.dev
127.0.0.1 api.domain.dev
127.0.0.1 test.domain.dev
server {
listen 80;
server_name api.domain.ru www.api.domain.ru;
proxy_set_header Host api.domain.ru;
location / {
rewrite ^(.*)$ https://api.domain.ru$1 permanent;
}
return 301 https://api.domain.ru$request_uri;
}
server {
listen 443 ssl http2;
server_name api.domain.ru www.api.domain.ru;
#......................
}
#################################################################
server {
listen 80;
server_name domain.ru www.domain.ru;
proxy_set_header Host domain.ru;
location / {
rewrite ^(.*)$ https://domain.ru$1 permanent;
}
return 301 https://domain.ru$request_uri;
}
server {
listen 443 ssl http2;
server_name domain.ru www.domain.ru;
#.......................
}
listen 443 ssl;
ssl_certificate /path/to/chain.pem;
ssl_certificate_key /path/to/privatekey.pem
location ~* \.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|xml|docx|xlsx)$ {
root /var/www/site2.ru;