オープンソースの販売サイト構築ソフト EC-CUBE についてのメモ。

XServer

SSH

  • 利用可能 (コンパネで有効化)
  • ポート: 10022
  • 公開鍵認証のみ利用可能。(パスワード認証は非対応)
    • 鍵生成はコンパネから可能。既存鍵の設定も可能。

Git

標準のバージョンが古い。

$ /bin/git --version
git version 1.8.3.1

ローカルインストール

$ git --version
$ mkdir ~/work
$ cd ~/work

# 0.24 は make でエラーとなった。

$ wget https://ftp.gnu.org/gnu/gettext/gettext-0.23.tar.gz && tar zxf gettext-0.23.tar.gz && cd gettext-0.23 && ./configure --prefix=$HOME/local && make && make install
$ (echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc) && source ~/.bashrc && which msgfmt
$ cd ~/work
$ wget https://www.kernel.org/pub/software/scm/git/git-2.49.0.tar.gz && tar zxf git-2.49.0.tar.gz && cd git-2.49.0 && ./configure --prefix=$HOME/local && make all && make install
$ which git
$ git --version

参考: https://qiita.com/y-ngi/items/7a170a19d809d2f49a15

サブドメインのディレクトリの参照を回避

メインサイト経由でサブドメインのディレクトリが参照されるのを回避する。(例: https://www.example.com/dev.example.com/robots.txt)

サブドメインのドキュメントルートに設置するパターン。

.htaccess
# メインサイト経由でサブドメインのディレクトリが参照されるのを回避 (XServer 向け)
<If "%{REQUEST_URI} =~ m#^/dev[\./]#">
    Require all denied
</If>
  • サブドメインは dev.example.com の想定。
  • サブドメインはディレクトリは dev.example.com または dev の想定。(コンパネで選択可能。)
  • m#^/dev[\./]# は動作未検証。m#^/dev\.# はサブディレクトリ dev.example.com で意図した動作となっていた。

未検証だが、メインサイト用の設定も可能なはず。*.example.com サブディレクトリへのアクセスを弾くイメージか。

hosting/www.xserver.ne.jp.txt · 最終更新: 2025/04/09 14:19 by seasoft
© 2008-2025 Seasoft.