The site with www does not open
There is an nginx frontend
server{
listen 80;
server_name test3.iandreev.com;
rewrite ^(.+)$ https://test3.iandreev.com$1 permanent;
}
server {
listen 80;
server_name www.test3.iandreev.com;
rewrite ^(.+)$ https://www.test3.iandreev.com$1 permanent;
}
upstream backend {
server 127.0.0.1:8080;
}
server {
listen 443 ssl http2;
server_name test3.iandreev.com www.test3.iandreev.com;
access_log /var/log/nginx/test3.iandreev.access.log;
error_log /var/log/nginx/test3.iandreev.error.log;
ssl_certificate /usr/local/etc/nginx/ssl/web-fullchain1.crt;
ssl_certificate_key /usr/local/etc/nginx/ssl/web1.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* .(jpg|jpeg|gif|png|ico|css|bmp|swf|js)$ {
root /home/site/adminunix.ru/static/;
}
}
Apache24 accepts an http request and returns nginx. SSL (https) only deals with nginx as a frontend. The question is what if you type in the browser test3.iandreev.com then the browser correctly converts to https://test3.iandreev.com and the site opens. A if you type www.test3.iandreev.com the result is this: The site cannot be accessed, the server IP address could not be found www.test3.iandreev.com. Tell please where is the error?
2
1 answers
The problem was in dns resolver pfsense.
0
Author: Alekperov, 2019-07-19 05:40:03