主題: nginx 安裝 lifetype 的問題, 簡潔網址
作者: hsuzy 於 十二月 03, 2008, 02:41:25 上午
我在 nginx + fastcgi 上安裝 lifetype
嗯, 用一般網址沒問題
不過改成簡潔網址就出問題 我有把 error的page 指到 lifetype 的 error.php
不過首頁上可以看到文章, 但是點進去單篇的時候 會出現找不到指定文章的訊息
不知道有沒有人成功在 nginx 上跑的 ...
--
話說我原本租虛擬主機的時候, lifetype 跑的好好的 不巧某天因為資源佔過多被鎖了 於是換 256ram 的 VPS, 搬家後跑 lifetype, loading 都 2以上 不知道哪邊可以改善 (跑 apache2, 有三個blog)
主題: 回覆: nginx 安裝 lifetype 的問題, 簡潔網址
作者: lss 於 十二月 03, 2008, 08:39:48 上午
我在 nginx + fastcgi 上安裝 lifetype
嗯, 用一般網址沒問題
不過改成簡潔網址就出問題 我有把 error的page 指到 lifetype 的 error.php
不過首頁上可以看到文章, 但是點進去單篇的時候 會出現找不到指定文章的訊息
不知道有沒有人成功在 nginx 上跑的 ...
nigix 沒用過,不過,簡潔網址需要 web server 支援 pathinfo ,給你參考。 lss
主題: 回覆: nginx 安裝 lifetype 的問題, 簡潔網址
作者: hsuzy 於 十二月 04, 2008, 01:08:09 下午
nigix 沒用過,不過,簡潔網址需要 web server 支援 pathinfo ,給你參考。 lss
謝謝 lss, 我後來找了 pathinfo 和 nginx 的資料, 可惜沒辦法搞定 後來直接修改 class/net/prettyrequestparser.class.php 不過 rss 會有問題 -----> 放棄 最好只好手工刻 nginx 的 rewrite 來符何蕳潔網址的規定 而這樣 error page 就不用指到 error.php location /blog {
# Permalink to the blog entry (i.e. /1_userfoo/archive/3_title-foo-bar.html) rewrite ^/blog/post/([0-9]+)/([0-9]+)$ /blog/index.php?op=ViewArticle&blogId=$1&articleId=$2 last; # -- same as above but with paging included rewrite ^/blog/post/([0-9]+)/([0-9]+)/page/([1-9]+)$ /blog/index.php?op=ViewArticle&blogId=$1&articleId=$2&page=$3 last;
# Monthly archive (i.e. /1_userfoo/archive/200401.html) rewrite "^/blog/archives/([0-9]+)/([0-9]{6})$" /blog/index.php?blogId=$1&Date=$2 last; # -- same as above but with paging included rewrite "^/blog/archives/([0-9]+)/([0-9]{6})/page/([1-9]+)$" /blog/index.php?blogId=$1&Date=$2&page=$3 last;
# Daily archive (i.e. /1_blogfoo/archive/20040101.html) rewrite "^/blog/archives/([0-9]+)/([0-9]{8})$" /blog/index.php?blogId=$1&Date=$2 last; # -- same as above but with paging included rewrite "^/blog/archives/([0-9]+)/([0-9]{8})/page/([1-9]+)$" /blog/index.php?blogId=$1&Date=$2&page=$3 last;
#user rewrite ^/blog/user/([0-9]+)/([0-9]+)$ /blog/index.php?blogId=$1&userId=$2 last;
# Album (i.e. /88_userfoo/albums/34_title-foo-bar.html) rewrite ^/blog/album/([0-9]+)/([0-9]+)$ /blog/index.php?op=ViewAlbum&blogId=$1&albumId=$2 last; # -- same as above but with paging included rewrite ^/blog/album/([0-9]+)/([0-9]+)/page/([1-9]+)$ /blog/index.php?op=ViewAlbum&blogId=$1&albumId=$2&page=$3 last;
# Albums (i.e. /88_userfoo/albums/) rewrite ^/blog/album/([0-9]+)$ /blog/index.php?op=ViewAlbum&blogId=$1&albumId=0 last;
# Category view (i.e. /88_userfoo/categories/4_cat-foobar.html) rewrite ^/blog/category/([0-9]+)/([0-9]+)$ /blog/index.php?blogId=$1&postCategoryId=$2 last; # -- same as above but with paging included rewrite ^/blog/category/([0-9]+)/([0-9]+)/page/([1-9]+)$ /blog/index.php?blogId=$1&postCategoryId=$2&page=$3 last;
# Category-Feeds (i.e. /3_userfoo/feeds/categories/2_category/atom) rewrite ^/blog/rss/([0-9]+)/([0-9]+)/(.*)$ /blog/rss.php?blogId=$1&categoryId=$2&profile=$3 last;
# Feeds (i.e. /3_userfoo/feeds/atom) rewrite ^/blog/rss/(.*)/([0-9]+)$ /blog/rss.php?blogId=$2&profile=$1 last;
# Trackbacks (i.e. /3_userfoo/trackbacks/34_title-foo-bar.html) rewrite ^/blog/trackbacks/([0-9]+)/([0-9]+)$ /blog/index.php?op=Trackbacks&blogId=$1&articleId=$2 last;
# Comment form (i.e. /88_userfoo/comment/34_title-foo-bar.html) rewrite ^/blog/comment/([0-9]+)/([0-9]+)$ /blog/index.php?op=Comment&blogId=$1&articleId=$2 last;
# Resources (i.e. /88_userfoo/resources/this-is-a-resource-name.pdf.html) rewrite ^/blog/resource/([0-9]+)/([0-9]+)$ /blog/index.php?op=ViewResource&blogId=$1&resId=$2 last;
# Download a resource (i.e. /88_userfoo/get/this-is-a-resource-name.pdf) rewrite ^/blog/get/([0-9]+)/(.+)$ /blog/resserver.php?blogId=$1&resource=$2 last;
# A non-default blog (i.e. /88_userfoo) rewrite ^/(blog/)+([0-9]+)$ /blog/index.php?blogId=$1 last; # -- same as above but with paging included rewrite ^/blog/([0-9]+)/page/([1-9]+)$ /blog/index.php?blogId=$1&page=$2 last; rewrite ^/blog/$ /blog/index.php?blogId=1 last;
# Static Pages (i.e /3_userfoo/demosites) rewrite ^/blog/static/([0-9]+)/(.+)$ /blog/index.php?op=Template&blogId=$1&show=$2 last; }
|