First add the dotdeb repo to your sources.list file:
Code:
nano /etc/apt/sources.list
Code:
deb http://packages.dotdeb.org squeeze all deb-src http://packages.dotdeb.org squeeze all
Code:
wget http://www.dotdeb.org/dotdeb.gpg cat dotdeb.gpg | apt-key add - rm dotdeb.gpg
Code:
apt-get update
Code:
apt-get install php5 php5-fpm php-pear php5-common php5-mcrypt php5-mysql php5-cli php5-gd
Code:
apt-get install nginx
Code:
nano /etc/php5/fpm/pool.d/www.conf
Code:
pm.max_children = 25 pm.start_servers = 4 pm.min_spare_servers = 2 pm.max_spare_servers = 10 pm.max_requests = 500
Code:
request_terminate_timeout = 30s
Code:
/etc/init.d/php5-fpm restart
Code:
nano /etc/nginx/nginx.conf
Code:
client_max_body_size 20M; client_body_buffer_size 128k;
Code:
cd /etc/nginx/sites-enabled rm default
Code:
nano /etc/nginx/sites-available/www.website.com
Code:
server { listen 80; server_name website.com www.website.com; access_log /var/log/nginx/website.access_log; error_log /var/log/nginx/website.error_log; root /var/www/www.website.com; index index.php index.htm index.html; location ~ .php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/www.website.com$fastcgi_script_name; include fastcgi_params; } }
Code:
ln -s /etc/nginx/sites-available/www.website.com /etc/nginx/sites-enabled/www.website.com
Code:
/etc/init.d/nginx restart
Code:
listen 443;
Code:
ssl on; ssl_certificate /path/to/certificate/www.website.com.crt; ssl_certificate_key /path/to/certificate_key/www.website.com.key;
No comments:
Post a Comment