LoginSignup
1
2

More than 5 years have passed since last update.

サイトURL生成(インフラ)

Posted at

サーバー上にフォルダ毎にプロジェクトを分けた場合に、フォルダ毎にサイトURLを付ける作業。

1.サーバー上(htdocs以下)に新規に作りたいサイトをフォルダ分け

例:
・htdocs/
 ・site-A/
 ・site-B/
 ・site-C/ ← New
*EC-CUBEならフォルダ毎入れる

2.Apacheのhttpd.confを修正

ここ /etc/httpd/conf/httpd.conf

①付与したいポートをListen追加する

Listen 8989

②どこかにVirtualHostの記述があるのでそこに下記記述を追加

httpd.conf
<virtualhost *:8989> #←数字は任意
  DocumentRoot "/var/www/html/htdocs/site-C" #対象フォルダのroot
</virtualhost>

3.Apacheの再起動

# /etc/init.d/httpd restart
もしくは
# service httpd restart
1
2
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
1
2