OpenSource CLI-App to install and handle stuff related to Web-Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB

4 years ago
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name <?php echo e($domain); ?> <?php if($redirect_www): ?> www.<?php echo e($domain); ?> <?php endif; ?>;
  5. return 301 https://<?php echo e($domain); ?>$request_uri;
  6. }
  7. <?php if($redirect_www): ?>
  8. server {
  9. listen 443 ssl http2;
  10. listen [::]:443 ssl http2;
  11. ssl_certificate /etc/letsencrypt/live/www.<?php echo e($domain); ?>/fullchain.pem;
  12. ssl_certificate_key /etc/letsencrypt/live/www.<?php echo e($domain); ?>/privkey.pem;
  13. include snippets/ssl-params.conf;
  14. include /etc/nginx/snippets/secure-headers.conf;
  15. server_name www.<?php echo e($domain); ?>;
  16. return 301 https://<?php echo e($domain); ?>$request_uri;
  17. }
  18. <?php endif; ?>
  19. server {
  20. listen 443 ssl http2;
  21. listen [::]:443 ssl http2;
  22. ssl_certificate /etc/letsencrypt/live/<?php echo e($domain); ?>/fullchain.pem;
  23. ssl_certificate_key /etc/letsencrypt/live/<?php echo e($domain); ?>/privkey.pem;
  24. add_header Content-Security-Policy "
  25. default-src 'self';
  26. font-src 'self';
  27. style-src 'self';
  28. img-src 'self';
  29. base-uri 'self';
  30. form-action 'self';
  31. frame-ancestors 'self';
  32. ";
  33. <?php echo $__env->make('partials.default', ['domain' => $domain], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  34. <?php echo $__env->yieldContent('server'); ?>
  35. }<?php /**PATH /home/test/Workspace/tentakelfabrik/mcp/resources/nginx/templates/layouts/ssl.blade.php ENDPATH**/ ?>