| 1 | server { |
|---|
| 2 | server_name healthguru.com; |
|---|
| 3 | rewrite ^(.*) http://www.healthguru.com$1 permanent; |
|---|
| 4 | } |
|---|
| 5 | |
|---|
| 6 | server { |
|---|
| 7 | server_name sexhealthguru.com www.sexhealthguru.com; |
|---|
| 8 | rewrite ^(.*) http://sex.healthguru.com$1 permanent; |
|---|
| 9 | } |
|---|
| 10 | |
|---|
| 11 | server { |
|---|
| 12 | server_name pregnancyhealthguru.com www.pregnancyhealthguru.com; |
|---|
| 13 | rewrite ^(.*) http://pregnancy.healthguru.com$1 permanent; |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | server { |
|---|
| 17 | server_name www.healthguru.com sex.healthguru.com college.healthguru.com pregnancy.healthguru.com news.healthguru.com; |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
|---|
| 21 | '$status $body_bytes_sent "$http_referer" ' |
|---|
| 22 | '"$http_user_agent"'; |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | access_log /var/log/hgplatform/nginx/access.log main; |
|---|
| 26 | |
|---|
| 27 | location / { |
|---|
| 28 | root /var/www/hg_release_beta10/document_root; |
|---|
| 29 | if (!-e $request_filename) { |
|---|
| 30 | rewrite ^/(.*)$ /index.php last; |
|---|
| 31 | break; |
|---|
| 32 | } |
|---|
| 33 | index index.php index.html index.htm; |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | location /Media/ { |
|---|
| 37 | rewrite ^/(.*)$ http://img1.healthguru.com/$1 redirect; |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | error_page 403 404 500 502 503 504 /index.php; |
|---|
| 41 | |
|---|
| 42 | location ~ \.php$ { |
|---|
| 43 | fastcgi_read_timeout 600; |
|---|
| 44 | fastcgi_pass 127.0.0.1:9000; |
|---|
| 45 | fastcgi_index index.php; |
|---|
| 46 | fastcgi_param SCRIPT_FILENAME /var/www/hg_release_beta10/document_root$fastcgi_script_name; |
|---|
| 47 | include fastcgi_params; |
|---|
| 48 | } |
|---|
| 49 | |
|---|
| 50 | location ~ /\.ht { |
|---|
| 51 | deny all; |
|---|
| 52 | } |
|---|
| 53 | } |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | |
|---|