@@ -12,43 +12,29 @@ http {
12
12
13
13
sendfile on ;
14
14
keepalive_timeout 65 ;
15
+ gzip on ;
16
+ gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
17
+ gzip_min_length 256 ;
15
18
16
- # Server block for the domain
17
19
server {
18
20
listen 80 ;
19
21
server_name heartlink.slghive.fr;
20
-
22
+
21
23
location / {
22
- proxy_pass http://116.202.238.184;
23
- proxy_set_header Host $host ;
24
- proxy_set_header X-Real-IP $remote_addr ;
25
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
26
- proxy_set_header X-Forwarded-Proto $scheme ;
27
- }
28
-
29
- error_page 500 502 503 504 /50x.html;
30
- location = /50x.html {
31
24
root /usr/share/nginx/html;
25
+ index index.html index.htm;
26
+ try_files $uri $uri / /index.html;
32
27
}
33
- }
34
28
35
- # Server block for the IP address to redirect to the domain
36
- server {
37
- listen 80 ;
38
- server_name 116.202.238.184 ;
39
-
40
- return 301 http://heartlink.slghive.fr$request_uri ;
41
- }
42
-
43
- # Default server block (optional, can be removed if not needed)
44
- server {
45
- listen 80 ;
46
- server_name localhost;
29
+ location ~* \.(?:manifest|appcache|html?|xml|json)$ {
30
+ expires -1;
31
+ # access_log logs/static.log; # Uncomment if you want to log static file access
32
+ }
47
33
48
- location / {
49
- root /usr/share/nginx/html ;
50
- index index.html ;
51
- try_files $uri $uri / /index.html ;
34
+ location ~* \.(?:css|js|woff2?|ttf|otf|eot|ico|svg|gif|jpe?g|png)$ {
35
+ expires 1y ;
36
+ access_log off ;
37
+ add_header Cache-Control "public" ;
52
38
}
53
39
54
40
error_page 500 502 503 504 /50x.html;
0 commit comments