Advertisement
Guest User

Nginx Conf file

a guest
Sep 24th, 2013
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <VirtualHost *:80>
  2.     DocumentRoot /var/www/projects/health1.india.com
  3.     ServerName health.india.com
  4.     ServerAlias www.health.india.com origin.health.india.com
  5.     CustomLog logs/health.india.com-access.log varnishcombined
  6.     ErrorLog logs/health.india.com-error.log
  7.   # CustomLog /dev/null common
  8.   # ErrorLog /dev/null
  9.  
  10.     setEnv HOSTNAME health.india.com
  11.     setEnv APP_HOST_PREFIX
  12.     setEnv DB_HOST 172.16.1.152
  13.     setEnv DB_NAME health_v2_india_com
  14.     setEnv DB_USER health_user
  15.     setEnv DB_PASSWORD 'HE@lTH'
  16.     setEnv VIEW_TRACKER_PATH 'http://tk.ind.sh/view.php'
  17.     setEnv SERVICE_ID "15"
  18.  
  19.         php_admin_value error_reporting 22527
  20.         php_admin_value error_log /dev/null
  21.         php_admin_flag  log_errors On
  22.         php_admin_flag  display_errors Off
  23.  
  24.  
  25.         ProxyPass /symptoms-search  http://medgle.com/symptoms-search
  26.         ProxyPassReverse /symptoms-search  http://medgle.com/symptoms-search
  27.         ProxyPass /ajaxmatch.jsp  http://medgle.com/ajaxmatch.jsp
  28.         ProxyPassReverse /ajaxmatch.jsp  http://medgle.com/ajaxmatch.jsp
  29.  
  30.  
  31.    <Directory /var/www/projects/health1.india.com>
  32.      AllowOverride All
  33.      Options FollowSymLinks MultiViews
  34. #    AuthType Basic
  35. #    AuthName "Beta Health Site"
  36. #    AuthUserFile /var/www/projects/health.india.com/.htpasswd
  37. #    Require valid-user
  38. #    Order allow,deny
  39. #    allow from all
  40.    </Directory>
  41.  
  42.    <IfModule mod_rewrite.c>
  43.      RewriteEngine On
  44.      RewriteCond %{HTTP_HOST}   ^www\.health\.india\.com [NC]
  45.      RewriteCond %{HTTP_HOST}   !^$
  46.      RewriteRule ^/(.*)         http://health.india.com/$1 [L,R=301]
  47.  
  48.      RewriteCond %{HTTP_USER_AGENT} !^MediafedMetrics.*
  49.      RewriteCond %{QUERY_STRING} &?feed=feed1
  50.      RewriteRule /  http://health.feedsportal.com/c/34928/f/646176/index.rss?
  51.  
  52.  
  53.      #added to control spam
  54.       RewriteCond %{REQUEST_METHOD} POST
  55.      RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
  56.      RewriteCond %{HTTP_REFERER} !.*health.india.com.* [OR]
  57.      RewriteCond %{HTTP_USER_AGENT} ^$
  58.      RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]
  59.  
  60. #       RewriteLog "/tmp/rewrite.log"
  61. #       RewriteLogLevel 2
  62.  
  63. #RewriteCond %{QUERY_STRING} ^((.*?)&|)utm_
  64. #RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1?%2 [R=301,NE,L]
  65.  
  66.    </IfModule>
  67.  
  68. </VirtualHost>
  69.  
  70.  
  71. <VirtualHost *:80>
  72.     DocumentRoot /var/www/projects/health1.india.com
  73.     ServerName origin.st1.health.india.com
  74.     ServerAlias st1.health.india.com
  75. <Directory /var/www/projects/health.india.com>
  76.     AllowOverride All
  77. </Directory>
  78. <IfModule mod_rewrite.c>
  79.     RewriteEngine On
  80.     Rewritecond %{HTTP_HOST}/$1 ^([^.]+)\.st1\.health\.india\.com [NC,OR]
  81.     Rewritecond %{HTTP_HOST}/$1 ^st1\.health\.india\.com [NC]
  82.     RewriteCond %{REQUEST_URI} ^/$
  83.     RewriteRule ^/(.*)         http://health.india.com/$1 [L,R=301]
  84. </IfModule>
  85. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement