-
Notifications
You must be signed in to change notification settings - Fork 0
サーバー設定
saruhei edited this page May 2, 2013
·
24 revisions
なんかきれいにかけない…泣
- user saruhei,sinamon
- group devloper(saruhei,sinamon)
- develoerにsudo権限を与えた。
ssh 10022
公開用に80、dev用に8080を開けた。
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 10022 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
ServerName 133.242.159.211
Options -Indexes FollowSymLinks
ServerTokens Prod
ServerSignature Off
バーチャルホストの設定
参考 バーチャルホストの例
Listen 80
Listen 8080
NameVirtualHost 133.242.159.211:80
NameVirtualHost 133.242.159.211:8080
<VirtualHost 133.242.159.211:80>
DocumentRoot /var/www/main
ServerName 133.242.159.211
</VirtualHost>
<VirtualHost 133.242.159.211:8080>
DocumentRoot /var/www/dev
ServerName 133.242.159.211
</VirtualHost>
シンボリックリンク
main → 本番用。80番ポート /var/www/codepirates/CodePirates
dev -> 開発用。8080ポート /home/dev/CodePirates
シンボリックリンクの変えかた。
ln -nsf リンク先(リンクを張りたい先のディレクトリ)リンク名(mainかdev)
developerディレクトリの所有者 saruhei:developerに変更しました。
GitでPush/Pullをするにはemailアドレスと名前の設定が必須。(クローンは不要)
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com