Advertisement
Guest User

Nginx Config File

a guest
Jan 17th, 2020
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name phpmyadmin.fastermc.xyz;
  5. # Enforce HTTPS
  6. return 301 https://$server_name$request_uri;
  7. }
  8. server {
  9. listen 443 ssl http2;
  10. server_name phpmyadmin.fastermc.xyz;
  11.  
  12. root /var/www/phpMyAdmin/;
  13. index index.php;
  14.  
  15. access_log /var/log/nginx/phpMyAdmin.app-access.log;
  16. error_log /var/log/nginx/phpMyAdmin.app-error.log error;
  17.  
  18. sendfile off;
  19.  
  20. # SSL Configuration
  21. ssl_certificate /etc/letsencrypt/live/fastermc.xyz/fullchain.pem;
  22. ssl_certificate_key /etc/letsencrypt/live/fastermc.xyz/privkey.pem;
  23. ssl_session_cache shared:SSL:10m;
  24. ssl_protocols TLSv1.2;
  25. ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES1>
  26. ssl_prefer_server_ciphers on;
  27.  
  28. # See https://hstspreload.org/ before uncommenting the line below.
  29. # add_header Strict-Transport-Security "max-age=15768000; preload;";
  30. add_header X-Content-Type-Options nosniff;
  31. add_header X-XSS-Protection "1; mode=block";
  32. add_header X-Robots-Tag none;
  33. add_header Content-Security-Policy "frame-ancestors 'self'";
  34. add_header X-Frame-Options DENY;
  35. add_header Referrer-Policy same-origin;
  36.  
  37. location / {
  38. try_files $uri $uri/ /index.php?$query_string;
  39. }
  40.  
  41. client_max_body_size 100M;
  42.  
  43. location ~ \.php$ {
  44. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  45. fastcgi_pass 192.168.1.192:9001;
  46. fastcgi_index index.php;
  47. include fastcgi_params;
  48. fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
  49. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  50. fastcgi_param HTTP_PROXY "";
  51. fastcgi_intercept_errors off;
  52. fastcgi_buffer_size 16k;
  53. fastcgi_buffers 4 16k;
  54. fastcgi_connect_timeout 300;
  55. fastcgi_send_timeout 300;
  56. fastcgi_read_timeout 300;
  57. include /etc/nginx/fastcgi_params;
  58. }
  59.  
  60. location ~ /\.ht {
  61. deny all;
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement