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