diff options
author | Joe <bousset.rudy@gmail.com> | 2022-04-27 15:39:10 +0000 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-04-27 15:39:20 +0000 |
commit | eea06d3eaffb3682733e1ed2a08ced7abcca85c2 (patch) | |
tree | 2fa27df19e72acdb7f3a967b48af16b9f5cac387 | |
parent | First commit (diff) | |
download | joe-conf-eea06d3eaffb3682733e1ed2a08ced7abcca85c2.tar.gz joe-conf-eea06d3eaffb3682733e1ed2a08ced7abcca85c2.tar.bz2 joe-conf-eea06d3eaffb3682733e1ed2a08ced7abcca85c2.tar.xz joe-conf-eea06d3eaffb3682733e1ed2a08ced7abcca85c2.tar.zst joe-conf-eea06d3eaffb3682733e1ed2a08ced7abcca85c2.zip |
nginx update
-rw-r--r-- | usr/local/etc/nginx/nginx.conf | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/usr/local/etc/nginx/nginx.conf b/usr/local/etc/nginx/nginx.conf index 2cfd861..4b4381b 100644 --- a/usr/local/etc/nginx/nginx.conf +++ b/usr/local/etc/nginx/nginx.conf @@ -13,13 +13,22 @@ http { gzip_vary on; gzip_min_length 1024; gzip_proxied expired no-cache no-store private auth; + map $sent_http_content_type $expires { + default off; + text/css 15m; + application/javascript 15m; + ~image/ 15m; + } + server{ server_name jozanofastora.xyz; - root /usr/local/www/jozan; - index index.html; + expires $expires; + location / { + root /usr/local/www/jozan; try_files $uri $uri/ =404; + index index.html; } location ~ /\.ht { deny all; @@ -48,9 +57,10 @@ http { server{ server_name gitjoe.xyz git.jozanofastora.xyz; - root /usr/local/www/gitjoe; - index index.html; + expires $expires; location / { + root /usr/local/www/gitjoe; + index index.html; try_files $uri $uri/ =404; } location ~ /\.ht { @@ -86,7 +96,7 @@ http { # Serve static files with nginx location ~* ^.+(cgit.(css|png)|favicon.ico|robots.txt) { - root /usr/share/webapps/cgit; + root /usr/local/www/cgit; expires 30d; } location / { |