123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- server {
- listen 80;
- listen [::]:80;
- server_name DOMAIN.LTD;
- return 301 https://$server_name$request_uri;
- }
- server {
- listen 443 ssl;
- listen [::]:443 ssl;
- server_name DOMAIN.LTD;
-
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_certificate "/etc/letsencrypt/live/DOMAIN.LTD/fullchain.pem";
- ssl_certificate_key "/etc/letsencrypt/live/DOMAIN.LTD/privkey.pem";
- ssl_dhparam /etc/nginx/ssl/certs/DOMAIN.LTD/dhparam.pem;
- ssl_session_cache shared:SSL:1m;
- ssl_session_timeout 10m;
- ssl_ciphers HIGH:!aNULL:!MD5;
-
- ssl_prefer_server_ciphers on;
- add_header Strict-Transport-Security "max-age=31536000;
- #includeSubDomains" always;
- charset utf-8;
- access_log on;
- error_log /var/www/DOMAIN.LTD/log/error.log;
- root /var/www/DOMAIN.LTD/app/src/dist/;
- index index.php index.html index.htm;
- location @app {
- rewrite ^/(.*)$ /index.html;
- }
- location / {
-
- try_files $uri $uri/ @app;
- }
- location @api {
- rewrite ^/api/(.*)$ /api/index.php;
- }
- location @rewrite {
- rewrite ^/api/(.*)$ /index.php?q=$1;
- }
- location /api {
- alias /var/www/enfrancais.fr/api/src/web/;
- try_files $uri $uri/ @api;
-
-
-
-
-
-
-
-
-
-
-
-
-
- location ~ \.php$ {
-
-
-
- include fastcgi_params;
-
-
-
-
-
- fastcgi_param SCRIPT_FILENAME $request_filename;
-
-
-
-
-
-
-
-
-
- fastcgi_pass unix:/run/php/php7.4-fpm.sock;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
- try_files $uri @rewrite;
- expires max;
- log_not_found off;
- }
- location ~ \..*/.*\.php$ {
- return 403;
- }
- location ~ ^/sites/.*/private/ {
- return 403;
- }
-
- location ~ ^/sites/[^/]+/files/.*\.php$ {
- deny all;
- }
-
- location ~* ^/.well-known/ {
- allow all;
- }
-
-
-
- location ~ (^|/)\. {
- return 403;
- }
-
- location ~ /vendor/.*\.php$ {
- deny all;
- return 404;
- }
- location ~ /\.ht {
- deny all;
- }
- sendfile off;
- client_max_body_size 100m;
-
-
- location ~ ^/sites/.*/files/styles/ {
- try_files $uri @rewrite;
- }
-
-
- location ~ ^(/[a-z\-]+)?/system/files/ {
- try_files $uri /index.php?$query_string;
- }
- }
- location = /favicon.ico { access_log off; log_not_found off; }
-
- add_header X-Frame-Options SAMEORIGIN;
- }
|