1+ server {
2+
3+ if ($host = goundo.md) {
4+ return 301 https://$host$request_uri;
5+ } # managed by EeasyCert
6+
7+
8+ if ($host = www.goundo.md) {
9+ return 301 https://$host$request_uri;
10+ } # managed by EasyCert
11+
12+ listen 80;
13+ root /var/www/html/;
14+ index index.php index.html index.htm;
15+ server_name goundo.md www.goundo.md;
16+ charset utf-8;
17+ }
18+ server {
19+ # SSL configuration
20+ listen 443 ssl http2;
21+ #listen [::]:443 ssl http2;
22+ root /var/www/html;
23+ index index.php index.html index.htm;
24+ server_name goundo.md www.goundo.md;
25+
26+ # for EasyCert Sertificates.
27+
28+ ssl_certificate /home/madeny/EasyCert/easycert/live/domain.com.ssl.crt; # managed by EasyCert
29+ ssl_certificate_key /home/madeny/EasyCert/easycert/live/domain.com.ssl.key; # managed by EasyCert
30+
31+
32+
33+ charset utf-8;
34+ gzip on;
35+ gzip_vary on;
36+ gzip_disable "msie6";
37+ gzip_comp_level 6;
38+ gzip_min_length 1100;
39+ gzip_buffers 16 8k;
40+ gzip_proxied any;
41+ gzip_types
42+ text/plain
43+ text/css
44+ text/js
45+ text/xml
46+ text/javascript
47+ application/javascript
48+ application/x-javascript
49+ application/json
50+ application/xml
51+ application/xml+rss;
52+ location / {
53+ try_files $uri $uri/ /index.php?$query_string;
54+ }
55+ location ~ \.php$ {
56+ try_files $uri /index.php =404;
57+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
58+ fastcgi_pass unix:/run/php/php7.1-fpm.sock;
59+ fastcgi_index index.php;
60+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
61+ include fastcgi_params;
62+ }
63+ location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|svg|woff|woff2|ttf)$ {
64+ expires 1M;
65+ access_log off;
66+ add_header Cache-Control "public";
67+ }
68+ location ~* \.(?:css|js)$ {
69+ expires 7d;
70+ access_log off;
71+ add_header Cache-Control "public";
72+ }
73+ location ~ /.well-known {
74+ allow all;
75+ }
76+ location ~ /\.ht {
77+ deny all;
78+ }
79+
80+
81+ }
0 commit comments