nginx.conf 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. location YNH_WWW_PATH {
  2. # Path to source
  3. alias YNH_WWW_ALIAS ;
  4. # rewrite all http request to https
  5. if ($scheme = http) {
  6. rewrite ^ https://$server_name$request_uri? permanent;
  7. }
  8. # Example PHP configuration
  9. index index.php;
  10. # Common parameter to increase upload size limit in conjuction with dedicated php-fpm file
  11. #client_max_body_size 50M;
  12. try_files $uri $uri/ index.php;
  13. location ~ [^/]\.php(/|$) {
  14. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  15. fastcgi_pass unix:/var/run/php5-fpm.sock;
  16. # Filename to be changed if dedicated php-fpm process is required
  17. # This is to be used INSTEAD of line above
  18. # Don't forget to adjust scripts install/upgrade/remove/backup accordingly
  19. #
  20. #fastcgi_pass unix:/var/run/php5-fpm-YNH_WWW_APP.sock;
  21. fastcgi_index index.php;
  22. include fastcgi_params;
  23. fastcgi_param REMOTE_USER $remote_user;
  24. fastcgi_param PATH_INFO $fastcgi_path_info;
  25. fastcgi_param SCRIPT_FILENAME $request_filename;
  26. }
  27. # Include SSOWAT user panel.
  28. include conf.d/yunohost_panel.conf.inc;
  29. }