0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ZOMEKI環境を構築した仮想マシンを移設する際に設定変更をする箇所

Last updated at Posted at 2013-07-19

MacやWindows上のVirtualBox内にCentOSをインストールし
ZOMEKIを構築したものを他の人に渡したり
他のマシン上で動かしたいといった場合があると思います。

そんな時に、ここの設定を変更すればOK!という箇所を書いておきます。

環境情報

マシン:Mac OS X 10.8.4
仮想環境プラットフォーム:VirtualBox 4.2.14
ゲストOS:CentOS 6.2

1. Apache設定ファイルの変更

/etc/httpd/conf/httpd.conf
# 276行目付近を移設先環境のIPまたはドメイン名に変更

 265 # ServerName gives the name and port that the server uses to identify itself.
 266 # This can often be determined automatically, but we recommend you specify
 267 # it explicitly to prevent problems during startup.
 268 #
 269 # If this is not set to valid DNS name for your host, server-generated
 270 # redirections will not work.  See also the UseCanonicalName directive.
 271 #
 272 # If your host doesn't have a registered DNS name, enter its IP address here.
 273 # You will have to access it by its address anyway, and this will make 
 274 # redirections work in a sensible way.
 275 #
 276 #ServerName www.example.com:80
 277 ServerName 192.168.1.100:80  "← ここを移設先環境のIPまたはドメイン名に変更"
 278 
 279 #
 280 # UseCanonicalName: Determines how Apache constructs self-referencing 
 281 # URLs and the SERVER_NAME and SERVER_PORT variables.
 282 # When set "Off", Apache will use the Hostname and Port supplied
 283 # by the client.  When set "On", Apache will use the value of the
 284 # ServerName directive.
 285 #
/etc/httpd/conf.d/zomeki.conf
# 15行目付近を移設先環境のIPまたはドメイン名に変更

  1 NameVirtualHost *:80
  2 
  3 <Directory /var/share/zomeki/sites>
  4     AllowOverride All
  5     RewriteEngine on
  6     PassengerEnabled on
  7     PassengerAppRoot /var/share/zomeki
  8     setenv LANG ja_JP.UTF-8
  9 </Directory>
 10 
 11 <VirtualHost *:80>
 12     AddType text/x-component .htc
 13     DocumentRoot /var/share/zomeki/sites/00/00/00/01/00000001/public
 14     Alias /_common/ "/var/share/zomeki/public/_common/"
 15     ServerName 192.168.1.100  "← ここを移設先環境のIPまたはドメイン名に変更"
 16     Include /var/share/zomeki/config/rewrite/base.conf
 17     Include /var/share/zomeki/sites/00/00/00/01/00000001/config/rewrite.conf
 18 </VirtualHost>
 19 
 20 Include /var/share/zomeki/config/virtual-hosts/sites.conf

2. ZOMEKI設定ファイルの変更

/var/share/zomeki/config/core.yml
# 12行目付近を移設先環境のIPまたはドメイン名に変更

  1 ---
  2 development:
  3   title: ZOMEKI
  4   uri: http://zomeki.example.com/
  5   proxy:
  6 test:
  7   title: ZOMEKI
  8   uri: http://zomeki.example.com/
  9   proxy:
 10 production:
 11   title: ZOMEKI
 12   uri: http://192.168.1.100/  "← ここを移設先環境のIPまたはドメイン名に変更"
 13   proxy:

3. ZOMEKIの設定変更

ZOMEKIについては、ブラウザから管理画面へログインし
サイトのドメイン設定の変更も行います。

3-1. ログインします。 http://192.168.1.100/_system/login
3-2. 管理画面 -> サイト -> ドメイン -> 詳細 -> 編集

サイトURLを修正して「編集する」をクリック
(文言はわかりづらいがこれが保存ボタン)

スクリーンショット_7_19_13_11_39_AM.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?