Nginx 的 Wowonder 設定不工作

Nginx 的 Wowonder 設定不工作

我的 wowonder PHP 腳本網站目前在 apache 伺服器上運行,並且運作良好。但我對它提供的速度不滿意,因為我的網站每天都在增長,我需要更快的速度,這就是為什麼我計劃將我的網站遷移到 Nginx 伺服器,我自己嘗試了很多次,但沒有一個明確的指南可以做到這一點。

我確實嘗試按照有關 WordPress 配置的指南來做到這一點,但我網站的一些漂亮的 URL 拋出 404 或 302 或只是隨機錯誤。

腳本的開發人員還提供了重寫規則nginx.conf 文件,我確實嘗試使用它,但這些規則在/etc/nginx/sites-available/example.com.conf 和/etc/nginx/nginx.conf 中不起作用

安裝指南在這裡。https://docs.wowonder.com/start.html

但我無法理解這個指南,因為我是 nginx 新手。我花了將近一年的時間試圖弄清楚它,但沒有成功,因為我對 nginx 一無所知。

我確實測試了我的 PHP 工作或使用 info.php 檔案。看起來 PHP 正在工作,我想我的特定配置或其他問題有問題。

只是一些漂亮的 url 不起作用 config.php 就可以了。如果有人能幫助我為 wowonder 建立 Nginx 配置,我將非常感激。

我在這裡提供配置範例。

server {
listen 81;
listen [::]:81;
root /var/www/tmp;
index index.php index.html index.htm index.nginx-debian.html;
location ~ \.php$ {
    try_files $uri @missing;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass 127.0.0.1:9000;
    set $path_info $fastcgi_path_info;
    fastcgi_param PATH_INFO $path_info;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_index index.php;
    include fastcgi.conf;
}

Wowonder 他們提供的 URL 規則。 https://docs.google.com/document/d/1rAJJyuqecCI8FOFbPWyjaMNC-TvVKrfZ08w4anf0NG4/edit?usp=sharing

請看看我長期存在的問題並可能幫助解決它。

編輯:::

感謝所有關注我的問題但我找到了解決方案的人。他幫助我,他正在寫一篇博客,很快就會完成,您也可以受益,我在完成後提供了一個 URL,您也可以按照解決方案進行操作。

https://dev.thewion.com/configure-wowonder-in-ubuntu-nginx-easy-and-fast-web-server

https://droidt99.com/read-blog/18503_how-to-install-wowonder-script-in-nginx-proxy.html

https://miui15.blogspot.com/2021/12/how-to-configure-wowonder-using-nginx.html

答案1

安裝文件在這裡: https://docs.wowonder.com/

他們在末尾有這樣的文字「嗯,正在使用 Nginx?如果您的伺服器正在使用 Nginx,請按照以下最後步驟操作:

Open your server's root nginx.conf file, most of the time It's located it in: /etc/nginx/nginx.conf
Open the home directory of the script, you should be able to find this file nginx.conf.
Open the located file, and copy its content to your root nginx.conf file: /etc/nginx/nginx.conf
If you find it something difficult to do, please contact your hosting provider, and they will do it for you easily.

我將腳本的 nginx 內容複製並貼上到我的 /etc/nginx/nginx.conf 中。但是在驗證配置時。它確實失敗了。

index.php 載入正常,但像 admincp.php 這樣的內部頁面無法載入。

請幫我正確取得此 nginx 設定文件,我應該在哪裡插入腳本中的文字?有具體的部分嗎?

順便說一句,我有 haproxy--- nginx--- 基於 nginx 的虛擬主機。

相關內容