nginx.conf 774 B

123456789101112131415161718192021222324252627
  1. #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
  2. location __PATH__/ {
  3. # Path to source
  4. alias __FINALPATH__/;
  5. # Force usage of https
  6. if ($scheme = http) {
  7. rewrite ^ https://$server_name$request_uri? permanent;
  8. }
  9. index index.html index.php ;
  10. try_files $uri $uri/ index.php;
  11. location ~ [^/]\.php(/|$) {
  12. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  13. fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
  14. fastcgi_index index.php;
  15. include fastcgi_params;
  16. fastcgi_param REMOTE_USER $remote_user;
  17. fastcgi_param PATH_INFO $fastcgi_path_info;
  18. fastcgi_param SCRIPT_FILENAME $request_filename;
  19. }
  20. # Include SSOWAT user panel.
  21. include conf.d/yunohost_panel.conf.inc;
  22. }