Deploying WordPress with NGINX and FastCGI

If your VPS hosting has Apache installed by default, you can disable or remove it like following.

To disable:

chkconfig httpd off
chkconfig --list httpd
httpd           0:off 1:off 2:off 3:off 4:off 5:off 6:off

To remove:

yum groupremove "Web Server"
OR
yum remove httpd

Continue reading “Deploying WordPress with NGINX and FastCGI”

How to disable SSH timeout

If you are experiencing ssh connection timeout to your VPS if there’s no input after a few minutes, the following tips will help you keep your connection alive.

Method 1 (from client)

This method is the way to go if you have no administrator access to the server you are connecting to.

Linux

Edit file ‘/etc/ssh/ssh_config‘ and set ‘ServerAliveInterval‘ option to the following:

ServerAliveInterval 120

Continue reading “How to disable SSH timeout”

Deploying web2py with NGINX and uWSGI

Install web2py

I like to install web2py under /var/www, but it can be installed anywhere you like.

Run following commands to download and setup web2py:

mkdir /var/www
cd /var/www
wget http://web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip && rm -rf web2py_src.zip
curl --output /var/www/web2py/scripts/sessions2trash.py http://web2py.googlecode.com/hg/scripts/sessions2trash.py
chown -R nginx:nginx web2py
cp -p web2py/handlers/wsgihandler.py web2py/    # need this for nginx + uwsgi

Continue reading “Deploying web2py with NGINX and uWSGI”