feat: deploy in Docker on the a75 server like cam85
Nginx image built locally for amd64 and loaded via docker save/load, compose on the a75 network behind Nginx Proxy Manager (port 3000). Live on officinezuliani.a75.eu with noindex on non-production hosts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# Configurazione del container: Nginx Proxy Manager (rete Docker "a75")
|
||||
# termina HTTPS e inoltra qui in HTTP sulla porta 3000 (come cam85).
|
||||
# Solo il dominio definitivo è indicizzabile: gli altri host (es. il test
|
||||
# officinezuliani.a75.eu) ricevono noindex. Valore vuoto = header non inviato.
|
||||
map $http_host $robots_tag {
|
||||
default "noindex, nofollow";
|
||||
~*(^|\.)officinezulianiudine\.it$ "";
|
||||
}
|
||||
|
||||
server {
|
||||
listen 3000;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
# URL puliti come sul sito attuale: /officina → officina.html
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
# Vecchi link con .html → URL pulito (evita contenuti duplicati).
|
||||
# Su $request_uri e non con una location: altrimenti colpirebbe anche
|
||||
# il rimando interno di "index" e "/" andrebbe in loop.
|
||||
if ($request_uri ~ ^/index\.html) { return 301 /; }
|
||||
if ($request_uri ~ ^/(.+)\.html(\?.*)?$) { return 301 /$1; }
|
||||
|
||||
# Asset con hash nel nome: cache lunga
|
||||
location /_astro/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location /img/ {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_types text/css application/javascript application/json image/svg+xml application/xml text/plain;
|
||||
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header X-Robots-Tag $robots_tag always;
|
||||
|
||||
# Il proxy davanti fa da origine pubblica: niente porta interna nei redirect
|
||||
absolute_redirect off;
|
||||
}
|
||||
Reference in New Issue
Block a user