SHOW:
|
|
- or go back to the newest paste.
1 | server { | |
2 | listen 443 ssl; | |
3 | - | server_name www.duhocuytin.com; |
3 | + | |
4 | ||
5 | # SSL | |
6 | ssl_certificate /etc/letsencrypt/live/duhocuytin.com/fullchain.pem; | |
7 | ssl_certificate_key /etc/letsencrypt/live/duhocuytin.com/privkey.pem; | |
8 | - | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
8 | + | |
9 | - | ssl_prefer_server_ciphers on; |
9 | + | rewrite ^(.*) https://duhoctoancau247.com$1 permanent; |
10 | - | ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; |
10 | + | |
11 | server { | |
12 | - | rewrite ^(.*) https://duhocuytin.com$1 permanent; |
12 | + | |
13 | server_name duhocuytin.com www.duhocuytin.com; | |
14 | rewrite ^(.*) https://duhoctoancau247.com$1 permanent; | |
15 | } | |
16 | ||
17 | - | rewrite ^(.*) https://duhocuytin.com$1 permanent; |
17 | + | |
18 | listen 2020; | |
19 | ||
20 | access_log off; | |
21 | - | listen 443 ssl default_server; |
21 | + | |
22 | - | |
22 | + | |
23 | - | # access_log off; |
23 | + | |
24 | - | access_log /home/duhocuytin.com/logs/access.log; |
24 | + | |
25 | - | # error_log off; |
25 | + | |
26 | - | error_log /home/duhocuytin.com/logs/error.log; |
26 | + | |
27 | ||
28 | - | root /home/duhocuytin.com/public_html; |
28 | + | |
29 | auth_basic_user_file /home/duhocuytin.com/private_html/hocvps/.htpasswd; | |
30 | ||
31 | location / { | |
32 | autoindex on; | |
33 | try_files $uri $uri/ /index.php; | |
34 | - | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
34 | + | |
35 | - | ssl_prefer_server_ciphers on; |
35 | + | |
36 | - | ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; |
36 | + | |
37 | fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
38 | - | # Improve HTTPS performance with session resumption |
38 | + | |
39 | - | ssl_session_cache shared:SSL:50m; |
39 | + | |
40 | - | ssl_session_timeout 1d; |
40 | + | |
41 | fastcgi_connect_timeout 1000; | |
42 | - | # DH parameters |
42 | + | |
43 | - | ssl_dhparam /etc/nginx/ssl/dhparam.pem; |
43 | + | |
44 | - | # Enable HSTS |
44 | + | |
45 | - | add_header Strict-Transport-Security "max-age=31536000" always; |
45 | + | |
46 | fastcgi_busy_buffers_size 256k; | |
47 | - | location / { |
47 | + | |
48 | - | try_files $uri $uri/ /index.php?$args; |
48 | + | |
49 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
50 | } | |
51 | - | # Custom configuration |
51 | + | |
52 | - | include /home/duhocuytin.com/public_html/*.conf; |
52 | + | |
53 | deny all; | |
54 | } | |
55 | } |