63 lines
1.8 KiB
Plaintext
63 lines
1.8 KiB
Plaintext
# Serwer www.sic.pl z projektem KSEF
|
|
server {
|
|
listen 80;
|
|
server_name www.sic.pl;
|
|
root /var/www/sic;
|
|
index index.html index.htm;
|
|
|
|
# Kompresja
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
gzip_min_length 1000;
|
|
|
|
# Lokacja /ksef/ - aplikacja PDF Generator
|
|
location /ksef/ {
|
|
alias /var/www/ksef/;
|
|
|
|
# Obsługa SPA: spróbuj plik, jeśli nie istnieje spróbuj index.html
|
|
try_files $uri $uri/ /ksef/index.html;
|
|
|
|
# Buforowanie: index.html bez cache
|
|
location = /ksef/index.html {
|
|
add_header Cache-Control "public, max-age=0, must-revalidate";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
}
|
|
|
|
# Buforowanie: statyczne assety z cache (1 rok)
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
}
|
|
}
|
|
|
|
# Zabezpieczenia
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "no-referrer-when-downgrade" always;
|
|
}
|
|
|
|
# Serwer www.esbr.pl
|
|
server {
|
|
listen 80;
|
|
server_name www.esbr.pl;
|
|
root /var/www/esbr;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
# Serwer www.sobczak.org
|
|
server {
|
|
listen 80;
|
|
server_name www.sobczak.org;
|
|
root /var/www/sobczak;
|
|
index index.html index.php;
|
|
|
|
auth_basic "Dostep zastrzezony"; # Tekst, który pojawi się w oknie logowania
|
|
auth_basic_user_file /etc/nginx/.htpasswd; # Ścieżka do pliku z hasłami
|
|
|
|
location ~ \.php$ {
|
|
include snippets/fastcgi-php.conf;
|
|
|
|
}
|
|
|
|
}
|