fork download
  1. # redirect from non-www to www
  2. # uncomment, save file and restart Nginx to enable
  3. #server {
  4. # listen 80;
  5. # server_name Sub.MyDomain.com;
  6. # return 301 $scheme://www.Sub.MyDomain.com$request_uri;
  7. # }
  8.  
  9. server {
  10. server_name Sub.MyDomain.com www.Sub.MyDomain.com;
  11. return 301 $scheme://Sub.MyDomain.com$request_uri;
  12.  
  13. # ngx_pagespeed & ngx_pagespeed handler
  14. #include /usr/local/nginx/conf/pagespeed.conf;
  15. #include /usr/local/nginx/conf/pagespeedhandler.conf;
  16. #include /usr/local/nginx/conf/pagespeedstatslog.conf;
  17.  
  18. # limit_conn limit_per_ip 16;
  19. # ssi on;
  20.  
  21. access_log /home/nginx/domains/Sub.MyDomain.com/log/access.log combined buffer=32k;
  22. error_log /home/nginx/domains/Sub.MyDomain.com/log/error.log;
  23.  
  24. root /home/nginx/domains/Sub.MyDomain.com/public;
  25.  
  26. location / {
  27.  
  28. # block common exploits, sql injections etc
  29. #include /usr/local/nginx/conf/block.conf;
  30.  
  31. # Enables directory listings when index file not found
  32. #autoindex on;
  33.  
  34. # Shows file listing times as local time
  35. #autoindex_localtime on;
  36.  
  37. # Enable for vBulletin usage WITHOUT vbSEO installed
  38. #try_files $uri $uri/ /index.php;
  39. try_files $uri $uri/ /index.php?q=$request_uri;
  40. }
  41.  
  42. include /usr/local/nginx/conf/staticfiles.conf;
  43. include /usr/local/nginx/conf/php.conf;
  44. include /usr/local/nginx/conf/drop.conf;
  45. #include /usr/local/nginx/conf/errorpage.conf;
  46. }
  47.  
Runtime error #stdin #stdout #stderr 0.03s 5268KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.sh: line 9: server: command not found
prog.sh: line 10: server_name: command not found
prog.sh: line 11: return: too many arguments
prog.sh: line 21: access_log: command not found
prog.sh: line 22: error_log: command not found
prog.sh: line 24: root: command not found
prog.sh: line 26: location: command not found
prog.sh: line 39: try_files: command not found
prog.sh: line 40: syntax error near unexpected token `}'
prog.sh: line 40: `  }'