Advertisement
Guest User

Untitled

a guest
Apr 14th, 2011
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name mydomain.com;
  4. rewrite ^ $scheme://www.mydomain.com$request_uri permanent;
  5. }
  6.  
  7.  
  8.  
  9. server {
  10. listen 80;
  11. server_name images.mydomain.com;
  12. root /var/www/templates/mydomain.com/assets/images;
  13. }
  14.  
  15.  
  16.  
  17. server {
  18. listen 80;
  19. server_name styles.mydomain.com;
  20. root /var/www/templates/mydomain.com/assets/styles;
  21. }
  22.  
  23.  
  24.  
  25. server {
  26. listen 80;
  27. server_name scripts.mydomain.com;
  28. root /var/www/templates/mydomain.com/assets/scripts;
  29. }
  30.  
  31.  
  32.  
  33. server {
  34. listen 80;
  35. server_name media.mydomain.com;
  36. root /var/www/media;
  37. }
  38.  
  39.  
  40.  
  41. server {
  42. listen 80;
  43. server_name www.mydomain.com;
  44. root /var/www/public_html;
  45. error_page 404 $scheme://www.mydomain.com/not_found;
  46. index index.php index.html;
  47. include shared_rewrite_rules;
  48.  
  49. # use fastcgi for all php files
  50. location ~ \.php$
  51. {
  52. fastcgi_pass 127.0.0.1:9000;
  53. fastcgi_index index.php;
  54. include fastcgi_params;
  55. }
  56. }
  57.  
  58.  
  59.  
  60. server {
  61. listen 443 ssl;
  62. server_name www.mydomain.com;
  63. root /var/www/public_html;
  64. index index.php index.html;
  65. include shared_rewrite_rules;
  66.  
  67. keepalive_timeout 70;
  68. ssl_session_timeout 5m;
  69. ssl_certificate_key /etc/nginx/ssl/mydomain.com/mydomain.com.key;
  70. ssl_certificate /etc/nginx/ssl/mydomain.com/mydomain.com.crt;
  71.  
  72. # use fastcgi for all php files
  73. location ~ \.php$
  74. {
  75. fastcgi_pass 127.0.0.1:9000;
  76. fastcgi_index index.php;
  77. fastcgi_param HTTPS on;
  78. include fastcgi_params;
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement