Skip to content

Instantly share code, notes, and snippets.

@freizl
Created July 3, 2012 09:01
Show Gist options
  • Save freizl/3038630 to your computer and use it in GitHub Desktop.
Save freizl/3038630 to your computer and use it in GitHub Desktop.
nginx-subdomain-proxy-conf
## Sample config for setting nginx as a gateway to local services.
upstream demosnap {
server localhost:9898;
server localhost:8080;
}
server {
listen 80;
server_name demo.example.org;
#access_log /var/log/nginx/log/host.access.log main;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://demosnap;
}
}
----- NodeJS
NODE_ENV=production forever start -a -m 20 -e err.log -o out.log app.js
----- Run Process Background
- `nohup some.sh` (nohup ./prod.sh >> ./demo.hcn.log 2>&1 &)
- `jobs` to see running jobs
- `fg %n`
------
for desktop
`yum groupinstall basic-desktop desktop-platform x11 fonts`
`yum install gmp zlib make gcc git wget`
wget ghc and cabal-install
install ghc
install cabal-install
`cabal install cabal-dev`
------------------- mongo db
<http://www.if-not-true-then-false.com/2010/install-mongodb-on-fedora-centos-red-hat-rhel/>
------------------- For Lower Memory machine
> # dd if=/dev/zero of=/tmp/swap bs=1M count=1024
> # mkswap /tmp/swap
> # swapon /tmp/swap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment