My public website https://www.chameth.com/
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

nginx.conf 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. user nginx;
  2. worker_processes 1;
  3. error_log /var/log/nginx/error.log warn;
  4. pid /var/run/nginx.pid;
  5. events {
  6. worker_connections 1024;
  7. }
  8. http {
  9. include /etc/nginx/mime.types;
  10. default_type application/octet-stream;
  11. map $http_x_forwarded_for $forwarded_anon {
  12. ~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
  13. ~(?P<ip>[^:]+:[^:]+): $ip::;
  14. default 0.0.0.0;
  15. }
  16. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  17. '$status $body_bytes_sent "$http_referer" '
  18. '"$http_user_agent" "$forwarded_anon"';
  19. access_log /logs/access.log main;
  20. sendfile on;
  21. keepalive_timeout 65;
  22. server_tokens off;
  23. add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
  24. add_header Content-Security-Policy "require-sri-for script; default-src 'none'; script-src 'self' 'sha384-m2EXauJIeXunnu9rWV0uaFjwoSeSA+jEbAKdI5sQaGiiiOwht/hOVB/8lq2JI8Bd'; img-src 'self' https://photos.chameth.com https://a.c5h.io; style-src 'self'; font-src 'self'; frame-ancestors 'none'; form-action 'none'; base-uri 'none';";
  25. add_header X-Frame-Options "SAMEORIGIN";
  26. add_header X-Content-Type-Options "nosniff";
  27. add_header X-XSS-Protection "1; mode=block";
  28. add_header Expect-CT "enforce; max-age=3600";
  29. add_header Referrer-Policy "no-referrer";
  30. gzip on;
  31. gzip_vary on;
  32. gzip_proxied any;
  33. gzip_comp_level 6;
  34. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  35. map $http_accept $webp_suffix {
  36. "~*webp" ".webp";
  37. }
  38. server {
  39. listen 80;
  40. server_name localhost;
  41. location / {
  42. root /usr/share/nginx/html;
  43. index index.html index.htm;
  44. location /res {
  45. expires 1y;
  46. }
  47. location ~ \.(png|jpe?g)$ {
  48. try_files $uri$webp_suffix $uri =404;
  49. expires 1y;
  50. }
  51. }
  52. #error_page 404 /404.html;
  53. error_page 500 502 503 504 /50x.html;
  54. location = /50x.html {
  55. root /usr/share/nginx/html;
  56. }
  57. }
  58. }