顯示具有 apache 標籤的文章。 顯示所有文章
顯示具有 apache 標籤的文章。 顯示所有文章

2015年7月8日

ubuntu 12.04 LTS升級14.04 LTS

1.執行 ‘do-release-upgrade’ 進行升級工作
2.修改/etc/apache2/sites-enable/000-default.conf檔
將DocumentRoot改為/var/www
3.修改/etc/default/locale檔LC_TIME="zh_TW.UTF-8"

2011年7月15日

Twminiserver apache2設定

<1>啟用apache2相關模組
       即是將/etc/apache2/mods-available下的檔做softlink到/etc /apache2/mdos-enabaled下,有指令可達成  (1) a2enmod 模組  (2) a2dismod 模組,sites-available相同用法  (1) a2ensite 模組  (2) a2dissite 模組

<2>/etc/apache2/sites-available內的default可改 DocumentRoot /var/www

<3>apache2 模組設定檔在/etc/apache2/mods-enabled以下
    (1) dir.conf為設定讀取網頁檔案的預設順序
       例: <IfModule mod_dir.c>
             DirectoryIndex index.html index.htm index.php index.cgi index.pl index.xhtml
           </IfModule>
    (2) userdir.conf為設定使用者家目錄,並配合chmod -R 755 家目錄
       例:<IfModule mod_userdir.c>
           UserDir public_html
           UserDir disabled root

          <Directory /home/*/public_html>
                AllowOverride FileInfo AuthConfig Limit Indexes
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
                <Limit GET POST OPTIONS>
                        Order allow,deny
                        Allow from all
                </Limit>
                <LimitExcept GET POST OPTIONS>
                        Order deny,allow
                        Deny from all
                </LimitExcept>
          </Directory>
         </IfModule>

Twminiserver apache2設定(php5.conf)

利用使用者家目錄裝wordpress時發現,使用者家目錄竟只能正常顯示.htm .html檔案,拒絕.php的程式檔,以前都放/var/www下,沒用使用者家目錄來裝過都沒發現,找到/etc/apache2/mods-enabled下的php5.conf,將檔內以下內容註解即可,就不會出現要開啟或下載視窗了
# <IfModule mod_userdir.c>
#        <Directory /home/*/public_html>
#            php_admin_value engine Off
#        </Directory>
#    </IfModule>
#</IfModule>