https_mail-mydomen 699 B

12345678910111213141516171819202122232425262728
  1. server {
  2. listen 194.4.1.6:443 ssl proxy_protocol;
  3. server_name mydomen.ru www.mydomen.ru;
  4. set_real_ip_from 91.193.62.251;
  5. real_ip_header proxy_protocol;
  6. include /etc/nginx/ssl/ssl_mydomen-ru.conf;
  7. if ( $scheme = "http" ) {
  8. rewrite ^/(.*)$ https://$host/$1 permanent;
  9. }
  10. ssi on;
  11. server_name mydomen.ru;
  12. if ($http_host !~ "^mydomen.ru$"){
  13. rewrite ^(.*)$ http://mydomen.ru$1 redirect;
  14. }
  15. root /home/www/mydomen;
  16. error_log /var/log/nginx/err-mydomen_ru.log;
  17. access_log /var/log/nginx/access-mydomen_ru.log;
  18. include /etc/nginx/templates/content.conf;
  19. include /etc/nginx/templates/letsencrypt.conf;
  20. }