1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| vi /etc/nginx/nginx.conf
vi /etc/nginx/conf.d/xplorist.tech.conf
server { listen 80; server_name xplorist.tech; client_max_body_size 1024m;
rewrite ^(.*)$ https://${server_name}$1 permanent;
error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }
server { listen 443 ssl http2; server_name xplorist.tech; client_max_body_size 1024m;
ssl_certificate /etc/nginx/cert.d/xplorist.tech/full.pem; ssl_certificate_key /etc/nginx/cert.d/xplorist.tech/key.pem;
ssl_session_timeout 5m;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384; ssl_protocols TLSv1.3 TLSv1.2; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m;
location / { root /usr/share/nginx/html; index index.html index.htm index.php; }
location ~ \.php$ { root /usr/share/nginx/html; include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.3-fpm.sock; } }
|