Advertisement
Twissel

Errorneous config of nginx

May 8th, 2019
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. server {
  2. listen 178.128.206.221:80;
  3. server_name webmail.origammi.tk mail.origammi.tk;
  4. root /var/lib/roundcube;
  5. index index.php;
  6.  
  7. include /home/admin/conf/mail/origammi.tk/nginx.forcessl.conf*;
  8.  
  9. location ~ /(config|temp|logs) {
  10. deny all;
  11. return 404;
  12. }
  13.  
  14. location ~ /\.(?!well-known\/) {
  15. deny all;
  16. return 404;
  17. }
  18.  
  19. location / {
  20. try_files $uri $uri/ /index.php?$args;
  21. location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
  22. expires 1h;
  23. fastcgi_hide_header "Set-Cookie";
  24. try_files $uri $uri/ index.php?$args @fallback;
  25. }
  26. }
  27.  
  28. location ~ ^/(.*\.php)$ {
  29. alias /var/lib/roundcube/$1;
  30. fastcgi_pass 127.0.0.1:9000;
  31. fastcgi_index index.php;
  32. include fastcgi_params;
  33. fastcgi_param SCRIPT_FILENAME $request_filename;
  34. }
  35. }
  36.  
  37. error_page 403 /error/404.html;
  38. error_page 404 /error/404.html;
  39. error_page 500 502 503 504 /error/50x.html;
  40.  
  41. location /error/ {
  42. alias /home/admin/web/origammi.tk/document_errors/;
  43. }
  44.  
  45. include /home/admin/conf/mail/origammi.tk/nginx.conf_*;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement