Entries from 2015-09-01 to 1 month

nginx 同じサーバー名かつ同じポート,複数アプリ(フォルダ) same port, same server_name, multi location

nginx.conf #app1 upstream backend-unicorn1 { server unix:/path_to_app1/tmp/unicorn.sock; } #app2 upstream backend-unicorn2 { server unix:/path_to_app2/tmp/unicorn.sock; } server { listen 80; server_name localhost; location /app1/ { .... pr…

unicorn_rails nginx sinatra&rails複数アプリをフォルダー毎 config.ru

config.ruをdev時でもprod時でも動くように設定 http://www.mk-mode.com/octopress/2013/01/22/ruby-on-rails-nginx-unicorn/ http://higelog.brassworks.jp/?p=1760# This file is used by Rack-based servers to start the application.require ::File.exp…

Sinatra/Railsがデフォルトでは外部から繋がらない

Rails Rails4.2からブラウザからアクセスしようとしたら繋がらない。 $ ./bin/rails s => Booting WEBrick => Rails 4.2.0 application starting in development on http://localhost:3000起動時のアドレスがlocalhostになっていると外部からのアクセスが繋…

redmine sqlite webrick

http://www.redmine.org/projects/redmine/wiki/Downloadwget http://www.redmine.org/releases/redmine-3.0.5.tar.gz$ cd ~/redmine-3.0.5 $ bundle install$ nano ~/redmine-3.0.5/config/database.yml# SQLite3 configuration example development: adapt…

refinary tutorial no work チュートリアル動かない 再考:ダウンロードページhttp://www.refinerycms.com/downloadより再構築

rails4で動く、動かない両方の記述が散出しているので、 https://github.com/refinery/refinerycms/issues/3032 を元に現時点(2015/9月)でのインストールとチュートリアル(http://www.refinerycms.com/guides/getting-started/#rails-application-templat…

refinary tutorial no work チュートリアル 動かない

Refinaryのgetting-startedを参考にインストールを試みたが、失敗。http://www.refinerycms.com/guides/getting-started http://www.refinerycms.com/download 参考の参考 http://blog.scimpr.com/2014/08/13/rails4-1%E3%81%AB%E5%AF%BE%E5%BF%9C%E3%81%97%…

RoR rails Could not find a JavaScript runtime.

/home/user/.rvm/gems/ruby-2.0.0-p643/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from …

rbenvのアンインストール

rbenvのアンインストール$ rm -rf ~/.rbenv $ rm -rf /usr/local/bin/rbenv $ rm -rf /usr/local/Cellar/rbenv.bash_profile等でPATHを設定した部分も削除して下さい

Ubuntu new user sudoer ubuntu ユーザを追加して sudo 権限をつける

adduser user_name (※ useradd はホームディレクトリが作成されない) su user_name gpasswd -a user_name sudo

rbenv directory 毎にruby version バージョン

RVM環境を切腹$ rvm seppukurbenvをクローンする。$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenvruby-buildをクローンする。$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build.bashrcに追記する。$…

nat

POSTROUTING ACCEPT [0 0] # Allow forward traffic to eth0 A POSTROUTING -s 10.99.99.0/24 -o eth0 -j MASQUERADE # Process the NAT table rules COMMITAt this point, you can run "sudo ufw disable && sudo ufw enable" or just reboot to be safe. Y…

note, you can use any DNS servers you like, the two above are OpenDNS's public DNS servers.

Edit /etc/pptpd.conf At the end of the file "/etc/pptpd.conf", add: localip 10.99.99.99 remoteip 10.99.99.100-199These values do not have to correspond to your network. It is best to pick un-accessible/unused addresses here if you only wan…

firewall ufw

http://silverlinux.blogspot.hk/2012/05/how-to-pptp-vpn-on-ubuntu-1204-pptpd.htmlHow To: PPTP VPN on Ubuntu 12.04 (pptpd) I recently started renting a 128 MB RAM Xen VPS for $15/quarter with a promotional offer for nqhost.com as seen on htt…

Ubuntu 14.04 日本語入力 input method

Fcitx and fcitx-anthy インストール後 http://www.server-world.info/query?os=Ubuntu_14.04&p=japanese

ubuntu 14.04 pptp client resolv.conf NetworkManager.conf DNS routing after PPTP connection

http://askubuntu.com/questions/640172/dns-routing-after-pptp-connection http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/ askubuntu.com/questions/137037/networkmanager-not-populating-resolv-conf

評判のさくらのVPSを使うときに最初にやっておきたいこと(Ubuntu編)

http://server-setting.info/ubuntu/first-setting-ubuntu-server.html

How to build a dedicated VPN router

http://websetnet.com/how-to-build-a-dedicated-vpn-router/

VPNを使っているLAN内のPCにWAN(外部)からルーターのForwardingを利用してアクセス

VPN使用時にはルーターからフォワードされたパケットは該当機に到達するが、その後処理され元のルーターに帰らずVPNのゲートウェイに押し出される。 結果として、外部からのアクセス結果がアクセスをした外部機に戻らなくなる。(外部機からはアクセス出来無…

PhantomJS headless browser

http://phantomjs.org/download.html http://phantomjs.org/build.html

buy app

http://www.chupamobile.com/split-test http://www.chupamobile.com/ios-app-templates/restaurant-app-premium-template-3725