EC-CUBE 1.4.5 をインストールしてみる1(Apacheの設定)
手元にあるEC-CUBEの1.4.5をインストールしてみる。後で 2系 もインストールしてみようっと。
※バージョン1.4.5には脆弱性があります。もう公開されていませんし、サポートもされていません。手元にある方でも閉じた環境で行ってください。
環境は
項目 | バージョン |
---|---|
Ubuntu | 9.04 |
PHP | 5.2.6.dfsg.1-3ubuntu4.1 |
PostgreSQL | 8.3.7-1 |
公開用のディレクトリの用意
% sudo mkdir /var/www/ec145 % sudo chown www-data.www-data ec145
/etc/apache2/sites-availableに、vhostを追加。
設定は以下のような感じに。
NameVirtualHost *:80
/etc/apache2/sites-availableに、145.ec-test.comを追加。
設定は以下のような感じに。
[追記] DocumentRootを変更(/var/www/ec145→/var/www/ec145/html)
[追記]
ServerName 145.ec-test.com ServerAdmin webmaster@localhost DocumentRoot /var/www/ec145/html Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order deny,allow deny from all allow from 127.0.1.1 ErrorLog /var/log/apache2/145.ec-test.com_error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/145.ec-test.com_access.log combined
以下のコマンドで、作成したファイルを site-enable に移動。
ちなみに戻すのは a2dissite コマンド。
% sudo a2ensite vhost % sudo a2ensite 145.ec-test.com
Apacheを再起動。
% /etc/init.d/apache restart * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [Thu Aug 06 23:45:02 2009] [warn] NameVirtualHost *:80 has no VirtualHosts ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [Thu Aug 06 23:45:03 2009] [warn] NameVirtualHost *:80 has no VirtualHosts ...done.
警告が出るけど、今のところ気にしない。
次に、/etc/hosts の 127.0.1.1 の行を変更。
127.0.1.1 pluto 145.ec-test.com
/var/www/ec145/html 配下に index.html を作成
<html><body><h1>動いてます</h1></body></html>
ブラウザで確認。
とりあえず、今日はここまで。