lighttpd/gpeasy
changeset 10 53c01c16b1cb
child 11 da454bf1bf63
equal deleted inserted replaced
9:448b0d5bdee1 10:53c01c16b1cb
       
     1 Rewrite rules for gpeasy:
       
     2 
       
     3 url.rewrite-if-not-file = (
       
     4   "^(.+)$" => "/index.php?$1"
       
     5 )
       
     6 
       
     7 Based on following article: configuring w/ nginx:
       
     8 
       
     9 http://www.computercorrect.com/2011/web-applications/configuring-nginx-for-gpeasy-cms/
       
    10 
       
    11 First, you should edit the index.php file in gpEasy’s root directory. Uncomment
       
    12 the line that mentions “gp_indexphp”, so that your file looks likes this:
       
    13 
       
    14 1 //define('gpdebug',true);
       
    15 2 define('gp_indexphp',false);
       
    16 3 //define('gptesting',true);
       
    17 4 require_once('./include/main.php');
       
    18 
       
    19 This tells gpEasy to use permalinks without “index.php” appearing in the URL.
       
    20 
       
    21 Next, you need to edit the appropriate nginx site configuration file so that is
       
    22 has a conditional rewrite rule like the one below:
       
    23 
       
    24 1 location /gpeasy/ {
       
    25 2 
       
    26 3 index   index.php index.htm index.html;
       
    27 4 
       
    28 5 if (!-e $request_filename){
       
    29 6 rewrite ^(.+)$ /gpeasy/index.php?$1 last;
       
    30 7 }
       
    31 8 
       
    32 9 }
       
    33 
       
    34 (Note that if your gpEasy installation is in your site’s root directory, then
       
    35 you’ll replace “/gpeasy/” with “/” throughout the block above.)
       
    36 
       
    37 Lastly, restart nginx and proceed with the installation of gpEasy.