diff --git a/book.xml b/book.xml index fd3e17a..ddbbde6 100644 --- a/book.xml +++ b/book.xml @@ -1,15 +1,4 @@ - - - - - - - - - - - - + + + diff --git a/get-started.md b/get-started.md new file mode 100644 index 0000000..e69de29 diff --git a/olds/book.xml b/olds/book.xml new file mode 100644 index 0000000..fd3e17a --- /dev/null +++ b/olds/book.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/custom.md b/olds/custom.md similarity index 100% rename from custom.md rename to olds/custom.md diff --git a/install.md b/olds/install.md similarity index 100% rename from install.md rename to olds/install.md diff --git a/main.md b/olds/main.md similarity index 100% rename from main.md rename to olds/main.md diff --git a/plans.md b/olds/plans.md similarity index 100% rename from plans.md rename to olds/plans.md diff --git a/ph-bookshelf.md b/ph-bookshelf.md new file mode 100644 index 0000000..2d39ee3 --- /dev/null +++ b/ph-bookshelf.md @@ -0,0 +1,5 @@ +# ph-Bookshelf + +![preview](./preview.png) + +45% diff --git a/preview.png b/preview.png new file mode 100644 index 0000000..6bcd07d Binary files /dev/null and b/preview.png differ diff --git a/web-server.md b/web-server.md new file mode 100644 index 0000000..2a216c0 --- /dev/null +++ b/web-server.md @@ -0,0 +1,40 @@ +# Web Server + +[Apache]: https://httpd.apache.org/ +[.htaccess]: https://httpd.apache.org/docs/2.4/howto/htaccess.html +[mod_rewrite]: https://httpd.apache.org/docs/current/mod/mod_rewrite.html + +ph-Bookshelf 原始版本是在 [Apache Web Server][Apache] 环境下开发的,并有用到 [Apache] 的 [.htaccess]。 + +你也可以在其它的环境下使用 **ph-Bookshelf**,只需要一些简单的路径重写设置。 + +## Apache + +要想在 [Apache] 中使用 **ph-Bookshelf**,你只需要确认一些简单的设置: + +确认 [mod_rewrite] 已经打开。这一般可以通过以下简单的命令确认: + +```shell +# a2enmod rewrite +``` + +> 如果你使用的是旧版 Apache一般存在于会被叫做 httpd 的 apache,module 配置或许会在服务器里,这时候,大概你的 Apache 的配置文件(通常为 /etc/apache2/httpd.conf 或者 /etc/httpd/httpd.conf),找到以下行并取消注释它: +> +> ```apache +> # uncomment this line +> LoadModule rewrite_module libexec/apache2/mod_rewrite.so +> ``` + +然后,为你的 ph-Bookshelf 目录配置允许路径重写: + +```apache + + AllowOverride All + +``` + +至此,你已经完成了 ph-Bookshelf 需要的所有配置。 + +你无需在 [Apache] 配置文件中配置路径重写规则,它已经存在在了 ph-Bookshelf 项目根目录下的 .htaccess 当中。 + +> 如果你是使用 php 站点托管,请询问你的托管服务商是否支持 [Apache] [.htaccess] 的使用。