especificosba.com.ar 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. server {
  2. listen 80;
  3. server_name curso.especificos.com.ar;
  4. rewrite ^ https://curso.especificosba.com.ar permanent;
  5. }
  6. server {
  7. listen 80;
  8. server_name especificos.com.ar www.especificos.com.ar especificosba.com.ar www.especificosba.com.ar especificosba.com.mx www.especificosba.com.mx;
  9. rewrite ^ https://especificosba.com.ar permanent;
  10. }
  11. server {
  12. listen 443 ssl http2; ## listen for ipv4; this line is default and implied
  13. include /etc/nginx/ssl;
  14. root /var/www/eba;
  15. index index.html index.htm;
  16. server_name especificosba.com.mx www.especificosba.com.mx www.especificosba.com.ar especificosba.com.ar;
  17. error_log /var/log/nginx/error.eba.log ;
  18. location /Mailing {
  19. index index.php index.html index.htm;
  20. }
  21. location /images/profile {
  22. sendfile off;
  23. expires off;
  24. }
  25. location ~* ^.+\.(?:css|js|cur|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|svg)$ {
  26. access_log off;
  27. expires 7d;
  28. open_file_cache max=3000 inactive=300s;
  29. open_file_cache_valid 360s;
  30. open_file_cache_min_uses 2;
  31. open_file_cache_errors off;
  32. }
  33. location ~ /ELearning(.*)$ {
  34. rewrite ^(.*)$ http://curso.especificosba.com.ar permanent;
  35. }
  36. location / {
  37. try_files $uri $uri/ /index.html;
  38. }
  39. location ~ \.php$ {
  40. try_files $uri =404;
  41. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  42. # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  43. fastcgi_pass unix:/var/run/php5-fpm.sock;
  44. fastcgi_index index.php;
  45. include fastcgi_params;
  46. fastcgi_param PATH_INFO $fastcgi_path_info;
  47. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  48. }
  49. # deny access to .htaccess files, if Apache's document root
  50. # concurs with nginx's one
  51. #
  52. location ~ /\.ht {
  53. deny all;
  54. }
  55. }
  56. server {
  57. listen 80;
  58. listen 443 ssl http2;
  59. include /etc/nginx/ssl;
  60. root /var/www/eba/ELearning;
  61. index index.php index.html index.htm;
  62. access_log /var/log/nginx/access_curso.eba.com.log ;
  63. error_log /var/log/nginx/error_curso.eba.com.log ;
  64. server_name curso.especificosba.com.ar;
  65. location ~* /pdfs/(.+)$ {
  66. types { application/octet-stream .pdf; }
  67. default_type application/octet-stream;
  68. access_log off;
  69. expires 0d;
  70. keepalive_timeout 65;
  71. #add_header Content-disposition "attachment; filename=$1.pdf";
  72. #add_header Pragma public;
  73. add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  74. }
  75. location /ws/ {
  76. proxy_set_header Upgrade $http_upgrade;
  77. proxy_set_header Connection "upgrade";
  78. proxy_http_version 1.1;
  79. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  80. proxy_set_header Host $host;
  81. proxy_pass http://backend;
  82. proxy_read_timeout 12000;
  83. }
  84. location ~* ^.+\.(?:cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|svg)$ {
  85. access_log off;
  86. expires 10d;
  87. ## No need to bleed constant updates. Send the all shebang in one
  88. ## fell swoop.
  89. tcp_nodelay on;
  90. ## Set the OS file cache.
  91. open_file_cache max=3000 inactive=120s;
  92. open_file_cache_valid 45s;
  93. open_file_cache_min_uses 2;
  94. open_file_cache_errors off;
  95. }
  96. location / {
  97. # First attempt to serve request as file, then
  98. # as directory, then fall back to displaying a 404.
  99. try_files $uri $uri/ /index.html;
  100. # Uncomment to enable naxsi on this location
  101. # include /etc/nginx/naxsi.rules
  102. }
  103. location ~ (images|videos)\.php$ {
  104. add_header Access-Control-Allow-Origin *;
  105. try_files $uri =404;
  106. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  107. # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  108. fastcgi_pass unix:/var/run/php5-fpm.sock;
  109. fastcgi_index index.php;
  110. include fastcgi_params;
  111. fastcgi_param PATH_INFO $fastcgi_path_info;
  112. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  113. }
  114. location ~ \.php$ {
  115. try_files $uri =404;
  116. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  117. # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  118. fastcgi_pass unix:/var/run/php5-fpm.sock;
  119. fastcgi_index index.php;
  120. include fastcgi_params;
  121. fastcgi_param PATH_INFO $fastcgi_path_info;
  122. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  123. }
  124. location /hls_mobile {
  125. add_header Access-Control-Allow-Origin *;
  126. types {
  127. application/vnd.apple.mpegurl m3u8;
  128. video/mp2t ts;
  129. }
  130. root /tmp/;
  131. add_header Cache-Control no-cache;
  132. }
  133. location /dash_mobile {
  134. root /tmp;
  135. add_header Cache-Control no-cache;
  136. add_header Access-Control-Allow-Origin *;
  137. # To avoid issues with cross-domain HTTP requests (e.g. during development)
  138. }
  139. location /hls {
  140. add_header Access-Control-Allow-Origin *;
  141. types {
  142. application/vnd.apple.mpegurl m3u8;
  143. video/mp2t ts;
  144. }
  145. root /tmp/;
  146. add_header Cache-Control no-cache;
  147. }
  148. location /dash {
  149. root /tmp;
  150. add_header Cache-Control no-cache;
  151. add_header Access-Control-Allow-Origin *;
  152. # To avoid issues with cross-domain HTTP requests (e.g. during development)
  153. }
  154. location /stat {
  155. rtmp_stat all;
  156. rtmp_stat_stylesheet stat.xsl;
  157. deny 127.0.0.2;
  158. }
  159. location /stat.xsl {
  160. root /var/www/eba/ELearning/;
  161. }
  162. }
  163. server {
  164. listen 80; ## listen for ipv4; this line is default and implied
  165. listen 443 ssl http2; ## listen for ipv4; this line is default and implied
  166. include /etc/nginx/ssl;
  167. root /var/www/piwik;
  168. index index.php index.html index.htm;
  169. server_name stats.especificosba.com.ar;
  170. location ~* ^.+\.(?:cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|svg)$ {
  171. access_log off;
  172. expires 10d;
  173. ## No need to bleed constant updates. Send the all shebang in one
  174. ## fell swoop.
  175. tcp_nodelay on;
  176. ## Set the OS file cache.
  177. open_file_cache max=3000 inactive=120s;
  178. open_file_cache_valid 45s;
  179. open_file_cache_min_uses 2;
  180. open_file_cache_errors off;
  181. }
  182. location / {
  183. # First attempt to serve request as file, then
  184. # as directory, then fall back to displaying a 404.
  185. try_files $uri $uri/ /index.html;
  186. # Uncomment to enable naxsi on this location
  187. # include /etc/nginx/naxsi.rules
  188. }
  189. location ~ \.php$ {
  190. try_files $uri =404;
  191. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  192. # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  193. fastcgi_pass unix:/var/run/php5-fpm.sock;
  194. fastcgi_index index.php;
  195. include fastcgi_params;
  196. fastcgi_param PATH_INFO $fastcgi_path_info;
  197. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  198. }
  199. }
  200. server {
  201. listen 80; ## listen for ipv4; this line is default and implied
  202. listen 443 ssl http2; ## listen for ipv4; this line is default and implied
  203. include /etc/nginx/ssl;
  204. root /var/www/uv;
  205. index index.php index.html index.htm;
  206. server_name iuv.especificosba.com.ar uv.especificosba.com.ar;
  207. location ~* ^.+\.(?:cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|svg)$ {
  208. access_log off;
  209. expires 10d;
  210. ## No need to bleed constant updates. Send the all shebang in one
  211. ## fell swoop.
  212. tcp_nodelay on;
  213. ## Set the OS file cache.
  214. open_file_cache max=3000 inactive=120s;
  215. open_file_cache_valid 45s;
  216. open_file_cache_min_uses 2;
  217. open_file_cache_errors off;
  218. }
  219. location / {
  220. # First attempt to serve request as file, then
  221. # as directory, then fall back to displaying a 404.
  222. try_files $uri $uri/ /index.html;
  223. # Uncomment to enable naxsi on this location
  224. # include /etc/nginx/naxsi.rules
  225. }
  226. location ~ \.php$ {
  227. add_header Access-Control-Allow-Origin *;
  228. try_files $uri =404;
  229. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  230. # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  231. fastcgi_pass unix:/var/run/php5-fpm.sock;
  232. fastcgi_index index.php;
  233. include fastcgi_params;
  234. fastcgi_param PATH_INFO $fastcgi_path_info;
  235. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  236. }
  237. }