nginx設定server模組不能出現feature這個字?
天蓬老师
天蓬老师 2017-07-03 11:43:13
0
1
899

nginx版本是1.11,在nginx.conf檔案中增加了下面這個server塊,nginx就不能啟動,把feature這個單字改為其他單詞,就可以啟動,不知什麼原理?


    #laravel-5-4-feature.com
    server {
        listen       80;
        server_name  laravel-5-4-feature.com;
        charset utf-8;

        location / {
            root   D:/wnmp/www/laravel-5-4-feature/public;
            index  index.php index.html index.htm;
            try_files $uri $uri/ /index.php?$query_string;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location ~ \.php$ {
            root           D:/wnmp/www/laravel-5-4-feature/public;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
        
    }
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

全部回覆(1)
伊谢尔伦

應該不是 feature 的問題

我在 nginx version: nginx/1.10.3下測試無此問題。我升級下nginx看看


已升級為 nginx version: nginx/1.12.0

測試配置:

server {
    server_name test-feature.dev;
}

運行結果:

~ ❯❯❯ curl -I http://test-feature.dev/
HTTP/1.1 200 OK
Server: nginx/1.12.0
Date: Fri, 30 Jun 2017 12:51:21 GMT
Content-Type: text/html
Content-Length: 612
Last-Modified: Tue, 18 Oct 2016 15:03:19 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: "580639b7-264"
Accept-Ranges: bytes

也請樓主提供下具體的nginx -t報錯資訊

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!