default.conf 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. server {
  2. listen 80;
  3. root /var/www/html/clameurs-lawebserie.fr/public_html;
  4. index index.html index.php;
  5. server_name dev.clameurs-lawebserie.fr;
  6. charset utf-8;
  7. location / {
  8. try_files $uri $uri/ /index.php?$query_string;
  9. }
  10. location = /favicon.ico { access_log off; log_not_found off; }
  11. location = /robots.txt { access_log off; log_not_found off; }
  12. access_log on;
  13. error_log /var/log/nginx/error.log error;
  14. sendfile off;
  15. client_max_body_size 100m;
  16. location ~ \.php$ {
  17. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  18. fastcgi_pass phpd7:9000;
  19. fastcgi_index index.php;
  20. include fastcgi_params;
  21. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22. fastcgi_intercept_errors off;
  23. fastcgi_buffer_size 16k;
  24. fastcgi_buffers 4 16k;
  25. fastcgi_read_timeout 150;
  26. }
  27. location ~ /\.ht {
  28. deny all;
  29. }
  30. }
  31. server {
  32. listen 80;
  33. root /var/www/html/clameurs-lawebserie.fr/static_html;
  34. server_name static.clameurs-lawebserie.fr;
  35. index index.html index.js index.css index.json index.woff index.ttf; # index.ico index.jpg index.png index.gif index.jpeg
  36. # rewrite ^/modules/(.*)\.(css|js)$ /modules/$1/index.$2 last;
  37. # rewrite ^/sites/all/modules/(.*)\.(css|js)$ /sites/all/modules/$1/index.$2 last;
  38. rewrite ^/analytics.js$ /analytics/index.js;
  39. rewrite ^/sites/default/files/(.+)\.(ico|png|jpeg|jpg|gif)$ /sites/default/files/$1/index.$2 last;
  40. rewrite ^/sites/default/files/styles/(.*)\.(ico|jpeg|jpg|gif|png)$ /sites/default/files/styles/$1/index.$2 last;
  41. rewrite ^/sites/all/themes/figureslibres/clameurs/images/(.*)\.(jpeg|jpg) /sites/all/themes/figureslibres/clameurs/images/$1/index.$2 last;
  42. rewrite ^/(.*)/(.*)\.(css|js|png|woff|ttf|ico|gif)$ /$1/$2/index.$3;
  43. charset utf-8;
  44. access_log on;
  45. error_log /var/log/nginx/error.log error;
  46. }