Advertisement
avivroth

Original Nginx config file

Jun 28th, 2014
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. server {
  2. listen 80;
  3.  
  4. server_name avivroth.com www.avivroth.com;
  5.  
  6. access_log /var/log/nginx/avivroth.com.access.log rt_cache;
  7. error_log /var/log/nginx/avivroth.com.error.log;
  8.  
  9. root /var/www/avivroth.com/htdocs;
  10. index index.php index.htm index.html;
  11.  
  12. location ~ \.php$ {
  13.  
  14. #this redirect is overridden by the first directive in common/wpcommon.conf
  15. location ~ /wp-(admin|login) {
  16. return 301 https://$host$request_uri;
  17. }
  18.  
  19. try_files $uri =404;
  20. include fastcgi_params;
  21. fastcgi_pass php;
  22. }
  23.  
  24. location / {
  25. try_files $uri $uri/ /index.php$is_args$args;
  26. }
  27.  
  28.  
  29. include common/wpcommon.conf;
  30. include common/locations.conf;
  31.  
  32. }
  33.  
  34. server {
  35. listen 443;
  36.  
  37. server_name avivroth.com www.avivroth.com;
  38.  
  39. access_log /var/log/nginx/avivroth.com.access.log rt_cache;
  40. error_log /var/log/nginx/avivroth.com.error.log;
  41.  
  42. root /var/www/avivroth.com/htdocs;
  43. index index.php index.htm index.html;
  44.  
  45. ssl on;
  46. ssl_certificate /etc/ssl/certs/avivroth.com.crt;
  47. ssl_certificate_key /etc/ssl/private/avivroth.com.key;
  48.  
  49. location ~/wp-(admin|login) {
  50. location ~ \.php$ {
  51. try_files $uri =404;
  52. include fastcgi_params;
  53. fastcgi_pass php;
  54. }
  55. }
  56.  
  57. location / {
  58. return 301 http://$host$request_uri;
  59. }
  60.  
  61. include common/wpcommon.conf;
  62. include common/locations.conf;
  63.  
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement