Advertisement
Guest User

nxinx_conf

a guest
Aug 27th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.61 KB | None | 0 0
  1. ############## nginx for dealer portal ################
  2. server {
  3. listen 80;
  4. server_name dealer-portal.dev;
  5. root /var/www/dealer-portal/App/webroot/;
  6.  
  7. access_log /var/log/nginx/dealer-portal.access.log;
  8. error_log /var/log/nginx/dealer-portal.error.log;
  9.  
  10. location / {
  11. index index.php;
  12. try_files $uri $uri/ /index.php?$args;
  13. }
  14.  
  15. location ~ \.php/?(.*)$ {
  16. fastcgi_connect_timeout 10s; # default of 60s is just too long
  17. fastcgi_read_timeout 10s; # default of 60s is just too long
  18. fastcgi_pass unix:/var/run/php5-fpm.sock;
  19. fastcgi_index index.php;
  20. include fastcgi_params;
  21. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22. }
  23. #Access phpmyadmin
  24. location /phpmyadmin {
  25. root /usr/share/;
  26. index index.php index.html index.htm;
  27. location ~ ^/phpmyadmin/(.+\.php)$ {
  28. try_files $uri =404;
  29. fastcgi_pass unix:/var/run/php5-fpm.sock;
  30. include fastcgi_params;
  31. }
  32. }
  33.  
  34. }
  35.  
  36.  
  37. ############## nginx for account.dealer portal ################
  38. server {
  39. listen 80;
  40. server_name accounts.dealer-portal.dev;
  41. root /var/www/dealer-portal/accounts/webroot/;
  42.  
  43. access_log /var/log/nginx/dealer-portal_accounts.access.log;
  44. error_log /var/log/nginx/dealer-portal_accounts.error.log;
  45.  
  46. location / {
  47. index index.php;
  48. try_files $uri $uri/ /index.php?$args;
  49. }
  50.  
  51. location ~ \.php/?(.*)$ {
  52. fastcgi_connect_timeout 3s; # default of 60s is just too long
  53. fastcgi_read_timeout 10s; # default of 60s is just too long
  54. fastcgi_pass unix:/var/run/php5-fpm.sock;
  55. fastcgi_index index.php;
  56. include fastcgi_params;
  57. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  58. }
  59. #Access phpmyadmin
  60. location /phpmyadmin {
  61. root /usr/share/;
  62. index index.php index.html index.htm;
  63. location ~ ^/phpmyadmin/(.+\.php)$ {
  64. try_files $uri =404;
  65. fastcgi_pass unix:/var/run/php5-fpm.sock;
  66. include fastcgi_params;
  67. }
  68. }
  69.  
  70. }
  71.  
  72. #################### store.dealer-portal.dev ####################
  73. server {
  74. listen 80;
  75. server_name store.dealer-portal.dev;
  76. root /var/www/dealer-portal/store/webroot;
  77.  
  78. access_log /var/log/nginx/dealer-portal_store.access.log;
  79. error_log /var/log/nginx/dealer-portal_store.error.log;
  80.  
  81. location / {
  82. index index.php;
  83. try_files $uri $uri/ /index.php?$args;
  84. }
  85.  
  86. location ~ \.php/?(.*)$ {
  87.  
  88. fastcgi_connect_timeout 30s; # default of 60s is just too long
  89. fastcgi_read_timeout 10s; # default of 60s is just too long
  90.  
  91. fastcgi_pass unix:/var/run/php5-fpm.sock;
  92. fastcgi_index index.php;
  93.  
  94. include fastcgi_params;
  95.  
  96. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  97. }
  98. #Access phpmyadmin
  99. location /phpmyadmin {
  100. root /usr/share/;
  101. index index.php index.html index.htm;
  102. location ~ ^/phpmyadmin/(.+\.php)$ {
  103. try_files $uri =404;
  104. fastcgi_pass unix:/var/run/php5-fpm.sock;
  105. include fastcgi_params;
  106. }
  107. }
  108. }
  109.  
  110. ############## nginx for account.dealer-presentation.dev ################
  111. server {
  112. listen 80;
  113. server_name accounts.dealer-presentation.dev;
  114. root /var/www/dealer-presentation/accounts/webroot/;
  115.  
  116. access_log /var/log/nginx/dealer-presentation_accounts.access.log;
  117. error_log /var/log/nginx/dealer-presentation_accounts.error.log;
  118.  
  119. location / {
  120. index index.php;
  121. try_files $uri $uri/ /index.php?$args;
  122. }
  123.  
  124. location ~ \.php/?(.*)$ {
  125. fastcgi_connect_timeout 3s; # default of 60s is just too long
  126. fastcgi_read_timeout 10s; # default of 60s is just too long
  127. fastcgi_pass unix:/var/run/php5-fpm.sock;
  128. fastcgi_index index.php;
  129. include fastcgi_params;
  130. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  131. }
  132. #Access phpmyadmin
  133. location /phpmyadmin {
  134. root /usr/share/;
  135. index index.php index.html index.htm;
  136. location ~ ^/phpmyadmin/(.+\.php)$ {
  137. try_files $uri =404;
  138. fastcgi_pass unix:/var/run/php5-fpm.sock;
  139. include fastcgi_params;
  140. }
  141. }
  142.  
  143. }
  144.  
  145. ############## nginx for app.dealer-presentation.dev ################
  146. server {
  147. listen 80;
  148. server_name app.dealer-presentation.dev;
  149. root /var/www/dealer-presentation/app/webroot/;
  150.  
  151. access_log /var/log/nginx/dealer-presentation_app.access.log;
  152. error_log /var/log/nginx/dealer-presentation_app.error.log;
  153.  
  154. location / {
  155. index index.php;
  156. try_files $uri $uri/ /index.php?$args;
  157. }
  158.  
  159. location ~ \.php/?(.*)$ {
  160. fastcgi_connect_timeout 60s; # default of 60s is just too long
  161. fastcgi_read_timeout 100s; # default of 60s is just too long
  162. fastcgi_pass unix:/var/run/php5-fpm.sock;
  163. fastcgi_index index.php;
  164. include fastcgi_params;
  165. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  166. }
  167. #Access phpmyadmin
  168. location /phpmyadmin {
  169. root /usr/share/;
  170. index index.php index.html index.htm;
  171. location ~ ^/phpmyadmin/(.+\.php)$ {
  172. try_files $uri =404;
  173. fastcgi_pass unix:/var/run/php5-fpm.sock;
  174. include fastcgi_params;
  175. }
  176. }
  177.  
  178. }
  179.  
  180.  
  181. ############### Vartual Host for dealer portal (KB) #######################
  182. server {
  183. listen 80;
  184. server_name kb.dealer-portal.dev;
  185. root /var/www/dealer-portal/kb/webroot/;
  186.  
  187. access_log /var/log/nginx/kb-dealer-portal.access.log;
  188. error_log /var/log/nginx/kb-dealer-portal.dev.error.log;
  189.  
  190. location / {
  191. index index.php;
  192. try_files $uri $uri/ /index.php?$args;
  193. }
  194.  
  195. location ~ \.php/?(.*)$ {
  196.  
  197. fastcgi_connect_timeout 3s; # default of 60s is just too long
  198. fastcgi_read_timeout 10s; # default of 60s is just too long
  199.  
  200. fastcgi_pass unix:/var/run/php5-fpm.sock;
  201. fastcgi_index index.php;
  202.  
  203. include fastcgi_params;
  204.  
  205. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  206. }
  207. #Access phpmyadmin
  208. location /phpmyadmin {
  209. root /usr/share/;
  210. index index.php index.html index.htm;
  211. location ~ ^/phpmyadmin/(.+\.php)$ {
  212. try_files $uri =404;
  213. fastcgi_pass unix:/var/run/php5-fpm.sock;
  214. include fastcgi_params;
  215. }
  216. }
  217.  
  218. }
  219.  
  220.  
  221. ############### Vartual Host for dealer portal (Blog) #######################
  222. server {
  223. listen 80;
  224. server_name blog.dealer-portal.dev;
  225. root /var/www/dealer-portal/blog/webroot/;
  226.  
  227. access_log /var/log/nginx/blog-dealer-portal.access.log;
  228. error_log /var/log/nginx/blog-dealer-portal.dev.error.log;
  229.  
  230. location / {
  231. index index.php;
  232. try_files $uri $uri/ /index.php?$args;
  233. }
  234.  
  235. location ~ \.php/?(.*)$ {
  236.  
  237. fastcgi_connect_timeout 3s; # default of 60s is just too long
  238. fastcgi_read_timeout 10s; # default of 60s is just too long
  239.  
  240. fastcgi_pass unix:/var/run/php5-fpm.sock;
  241. fastcgi_index index.php;
  242.  
  243. include fastcgi_params;
  244.  
  245. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  246. }
  247. #Access phpmyadmin
  248. location /phpmyadmin {
  249. root /usr/share/;
  250. index index.php index.html index.htm;
  251. location ~ ^/phpmyadmin/(.+\.php)$ {
  252. try_files $uri =404;
  253. fastcgi_pass unix:/var/run/php5-fpm.sock;
  254. include fastcgi_params;
  255. }
  256. }
  257.  
  258. }
  259.  
  260.  
  261. ############### Vartual Host for dealer portal (FAQs) #######################
  262. server {
  263. listen 80;
  264. server_name faq.dealer-portal.dev;
  265. root /var/www/dealer-portal/faq/webroot/;
  266.  
  267. access_log /var/log/nginx/faq-dealer-portal.access.log;
  268. error_log /var/log/nginx/faq-dealer-portal.dev.error.log;
  269.  
  270. location / {
  271. index index.php;
  272. try_files $uri $uri/ /index.php?$args;
  273. }
  274.  
  275. location ~ \.php/?(.*)$ {
  276.  
  277. fastcgi_connect_timeout 3s; # default of 60s is just too long
  278. fastcgi_read_timeout 10s; # default of 60s is just too long
  279.  
  280. fastcgi_pass unix:/var/run/php5-fpm.sock;
  281. fastcgi_index index.php;
  282.  
  283. include fastcgi_params;
  284.  
  285. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  286. }
  287. #Access phpmyadmin
  288. location /phpmyadmin {
  289. root /usr/share/;
  290. index index.php index.html index.htm;
  291. location ~ ^/phpmyadmin/(.+\.php)$ {
  292. try_files $uri =404;
  293. fastcgi_pass unix:/var/run/php5-fpm.sock;
  294. include fastcgi_params;
  295. }
  296. }
  297.  
  298. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement