Skip to content

Instantly share code, notes, and snippets.

@koenhendriks
Last active June 3, 2022 20:20
Show Gist options
  • Save koenhendriks/795140351a4eaab9af75df2c04efedda to your computer and use it in GitHub Desktop.
Save koenhendriks/795140351a4eaab9af75df2c04efedda to your computer and use it in GitHub Desktop.

Revisions

  1. koenhendriks revised this gist May 24, 2017. 2 changed files with 7 additions and 19 deletions.
    7 changes: 7 additions & 0 deletions Laravel Docroot IspConfig 3.1 Nginx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    location / {
    root {DOCROOT}public
    if ($scheme != "https") {
    rewrite ^ https://$http_host$request_uri? permanent;
    }
    try_files /public/$uri /public/$uri/ /public/index.php?$query_string;
    }
    19 changes: 0 additions & 19 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,19 +0,0 @@
    location / {

    root {DOCROOT}public;
    index index.php;
    try_files $uri $uri/ /index.php?$query_string /public/index.php?$query_string;

    if ($scheme != "https") {
    rewrite ^ https://$http_host$request_uri? permanent;
    }
    }

    location @php {
    try_files $uri /index.php =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    {FASTCGIPASS}
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
    }
  2. koenhendriks created this gist May 23, 2017.
    19 changes: 19 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    location / {

    root {DOCROOT}public;
    index index.php;
    try_files $uri $uri/ /index.php?$query_string /public/index.php?$query_string;

    if ($scheme != "https") {
    rewrite ^ https://$http_host$request_uri? permanent;
    }
    }

    location @php {
    try_files $uri /index.php =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    {FASTCGIPASS}
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
    }