Eolisation de l'applicatif MSE
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mse-nginx.conf 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. server {
  2. listen 80;
  3. server_name %%pvebundle_domain;
  4. root /var/www/html/mse/web;
  5. error_log /var/log/nginx/mse.error.log;
  6. access_log /var/log/nginx/mse.access.log;
  7. location / {
  8. if ($args ~ "page=/pve/(.*)$") {
  9. return 301 https://$server_name/$1;
  10. }
  11. if ($args ~ "page=/envole/includes/plugins/plugin_pve/(.*).php$") {
  12. return 301 https://$server_name/page/$1;
  13. }
  14. try_files $uri /app.php$is_args$args;
  15. }
  16. # Rewrites
  17. location ~ ^/(envole|pve)/?(.*) {
  18. return 301 https://$server_name/$2$is_args$args;
  19. }
  20. location ~ ^/app\.php(/|$) {
  21. fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
  22. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  23. include fastcgi_params;
  24. # When you are using symlinks to link the document root to the
  25. # current version of your application, you should pass the real
  26. # application path instead of the path to the symlink to PHP
  27. # FPM.
  28. # Otherwise, PHP's OPcache may not properly detect changes to
  29. # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
  30. # for more information).
  31. fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  32. fastcgi_param DOCUMENT_ROOT $realpath_root;
  33. # Prevents URIs that include the front controller. This will 404:
  34. # http://domain.tld/app.php/some-path
  35. # Remove the internal directive to allow URIs like this
  36. internal;
  37. }
  38. # return 404 for all other php files not matching the front controller
  39. # this prevents access to other php files you don't want to be accessible.
  40. location ~ \.php$ {
  41. return 404;
  42. }
  43. }