Welcome! Log In Create A New Profile

Advanced

Domain does not work on https - nginx

Posted by stim_alex 
Domain does not work on https - nginx
July 02, 2018 08:08AM
Hello. There is nginx, which I manually added manually adding each module.
Here so configured:
./configure -with-http_ssl_module -conf-path = / etc / nginx / nginx.conf -add-module = / opt / geoip2 / ngx_http_geoip2_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module - -http-log-path = / var / log / nginx / access.log --error-log-path = / var / log / nginx / error.log --with-debug --with-pcre-jit --with -ipv6 -with-http_realip_module -with-http_auth_request_module -with-http_addition_module -with-http_dav_module -with-http_gunzip_module -with-http_gzip_static_module -with-http_v2_module -with-http_sub_module -with-stream -with -mail --with-threads --with-stream_ssl_module --with-mail_ssl_module

There are two sites in sites-enabled: api and panel.
api works on http and all the rules. But the panel works by https. It seems like all the plugins connected ssl, but vseravno does not want to go.
Configuration panel:

server {
listen 80;
server_name panel.MY_DOMEN.ru;

location / {
return 301 https://$server_name$request_uri;
}
}

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# HTTPS server
server {
listen 443 ssl http2;
server_name panel.MY_DOMEN.ru;

access_log /var/log/nginx/panel.access.log;
error_log /var/log/nginx/panel.error.log;

include snippets/ssl-MY_PROJECT.conf;
include snippets/ssl-params.conf;

rewrite ^(/)$ https://$host/admin/$1 permanent;

location /admin/ws {
proxy_pass http://localhost:9000;

proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 1000s;

proxy_cache_bypass 1;
proxy_no_cache 1;
}

# serve assets or request page from proxy (if asset not found)
location / {
try_files $uri @proxy;
}

# the play web server
location @proxy {
proxy_pass http://localhost:9000;
proxy_redirect off;
proxy_buffering off;

#send protocol info to play server
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

Before installing nginx from scratch, nginx was downloaded by the command sudo apt-get install nginx. After that, I deleted the nginx-common with the sudo apt-get purge command and put it from scratch.

The keys in the snippets folder were already there. Do I need to generate new keys after each nginx installation? And anyway, why do I think why I can not enter the domain panel.MY_DOMEN.ru?
Previously, this domain worked in the past nginx.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready