Koken 是一個輕量的 PHP 相簿程序,支持 Apache 及 Nginx 網頁程序,相片瀏覽速度快,後台管理相簿功能齊全,並且支援的佈景、插件也不少。
用 Nginx 安裝之後,首頁有個 domain.com/index.php?/ 不好看的網址會出現,雖然不影響功能,每個連接都會有 index.php?,還蠻難看的。
Koken 官網:
Koken 下載:
網址修改方法
修改 Nginx conf 文件,可以將 index.php? 取消掉。
在 etc / nginx / common 下,新增一個 locations-koken.conf 文件:
在 etc / nginx / common 下,新增一個 php-koken.conf 文件:
這兩個文件建置好後,在 etc / nginx / sites-available / domain 修改內容為:
server { .............. index index.php index.html index.htm; include common/php-koken.conf; include common/locations-koken2.conf; include /var/www/domain.com/conf/nginx/*.conf; }
重新啟動 Nginx
nginx -t && service nginx restart
參考文件:
GitHub Gist: star and fork bradleyboy's gists by creating an account on GitHub.
Featured Photo by MichaelGaida on pixabay
Latest posts by yungke (see all)
- WooWP 黑色星期五優惠 - 2020-11-12
- WordPress Multisite 的重定向 Redirect 規則 - 2020-11-02
- 舊 WordPress 安裝 Multisite 子目錄解決方式 - 2020-10-25