Skip to content

Instantly share code, notes, and snippets.

@otiai10
Last active December 24, 2015 09:49
Show Gist options
  • Save otiai10/6779454 to your computer and use it in GitHub Desktop.
Save otiai10/6779454 to your computer and use it in GitHub Desktop.
VPSをDebian7.1wheezyにしたのでサーバセットアップのログを取っておこうと思ったわけ 2
@otiai10
Copy link
Author

otiai10 commented Oct 3, 2013

tmuxのインストール

www15224uf% sudo apt-get install tmux
[sudo] password for otiai10:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  tmux
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 249 kB of archives.
After this operation, 543 kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org/debian/ wheezy/main tmux amd64 1.6-2 [249 kB]
Fetched 249 kB in 0s (592 kB/s)
Selecting previously unselected package tmux.
(Reading database ... 38622 files and directories currently installed.)
Unpacking tmux (from .../archives/tmux_1.6-2_amd64.deb) ...
Processing triggers for man-db ...
Setting up tmux (1.6-2) ...
www15224uf% which tmux
/usr/bin/tmux

@otiai10
Copy link
Author

otiai10 commented Oct 8, 2013

apache2のインストールとリバースプロキシ設定

インストール

www15224uf% sudo apt-get install apache2

proxyモジュールを有効にする

http://otiai10.hatenablog.com/entry/2013/02/12/162501

www15224uf% sudo a2enmod proxy
www15224uf% sudo a2enmod proxy_http
www15224uf% sudo a2enmod proxy_connect

httpd.confを編集する

/etc/apache2/conf.d/httpd.confであった。/etc/apache2/httpd.confでうまくいってたのはなぜだ?

<VirtualHost *:80>
    ServerName yourservicename.com
    ServerAdmin [email protected]

    ProxyRequests off
    ProxyPass / http://applicationserver.com:7777/
    <Location />
        ProxyPassReverse http://applicationserver.com:7777/
        ProxyPassReverseCookieDomain localhost yourservicename.com
        ProxyPassReverseCookiePath / /
        Order allow,deny
        # Allow Allでいいのかな?
        Allow from all
    </Location>
</VirtualHost>

apache restart

www15224uf% sudo /etc/init.d/apache2 restart

@otiai10
Copy link
Author

otiai10 commented Jun 19, 2014

ちょっと訂正

ユーザ関係

  1. suでrootに
  2. apt-getでsudoをinstall
  3. visudoも一緒に入ってくるから一般ユーザをsudoerに追加
  4. exitで一般ユーザに戻る

nginx

  1. sudo apt-get install nginx
  2. sudo which nginx (入ってる確認)
  3. exitで一般ユーザに戻る
  4. sudo nginx
  5. なんも記述無いけどデフォルトのドキュメントルートは/usr/share/nginx/index.htmlっぽい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment