Apache Server 升級至2.4後
有一些設定上的變更
若升級時設定檔沒有修正將無法啟動
Tsung’s Blog 整理一些了:http://blog.longwin.com.tw/2014/03/apache-22-24-upgrade-conf-2014/
(有時間的時候再自己整理了Orz…)
另外記錄一下Tsung’s Blog內沒有提到的:
今天做完升級後Apache服務沒有起來
啟動服務時出現:
* Starting web server apache2
*
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 60 of /etc/apache2/sites-enabled/000-default.conf:
Either all Options must start with + or -, or no Option may.
Action 'configtest' failed.
The Apache error log may have more information.
意思就是說關於Options這行的設定
後面接的每一個option value你要全部上「+」或是「-」,或是全部都不加
不然在configtest就不會讓你過
解法就如同字面意思,要嘛全加,要嘛都不加
<Directory /var/www/>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride FileInfo
Order allow,deny
allow from all
<Directory>
如果原設定檔的option value有點多
你也可以把需要+-號的value獨立寫一行,像這樣
<Directory /var/www/>
Options FollowSymLinks MultiViews
# 需要+-號的value獨立出來
Options -Indexes
AllowOverride FileInfo
Order allow,deny
allow from all
<Directory>
apachectl configtest 只會針測到一個錯誤點就停下
不會一次列出清單
所以要一步一步找出所有還沒修改到的地方直接出現 Syntax OK
configtest過了,就可以啟動了
calos3257@ubuntu:~[W0]$ apachectl configtest
Syntax OK
calos3257@ubuntu:~[W0]$ sudo service apache2 start
* Starting web server apache2
...done.
搞定
我們公司某個網頁用apache struts 2.3.15.3
環境是windows server 2012 standard
因為資策會公告有安全漏洞,
所以要更新到2.3.32
只是這系統很久之前負責人已離職,
因此上網求救如何更新,
需要詳細步驟,感恩!