Because the system performance requirements are very low, so select the link-1,2.5g hard disk, 64M memory, 100GB traffic, 1 Independent IP.
Use the discount code 9dmm7r can have a 10% discount, vpslink.com. Of course, can also find a larger discount code, but generally limited to 3 months.
Install OS in vpslink background, select ubuntu9.04, one minute after system installed, SSH login root.
Work 1: Configure the Web server
To debug a program, a Web server that supports PHP is still needed. Memory is too small, so abandoned the always Apache, instead of Nginx, and through the fast-cgi to support PHP. Vpslink provides the source image of Ubuntu, the speed is not said.
(1) One-Step, install Nginx and PHP
Apt-get install Nginx php5-cli php5-cgi php5-mysql
(2) because the need to spawn-fcgi to start fast-cgi, so install LIGHTTPD, and set to boot does not start
Apt-get Install LIGHTTPD
(3) Configure fast-cgi
In the/etc/init.d/under the establishment of PHP-CGI service files, simple, you can directly copy Nginx to modify
CP Nginx PHP-CGI
VI php-cgi, modify corresponding parameters
daemon=/usr/bin/spawn-fcgi
Daemon_opts= "-A 127.0.0.1-p 9000-c 10-u www-data-f/usr/bin/php-cgi"
When you modify the stop, the action is: pkill-9 php-cgi
Save, exit.
(4) Configure Nginx, open PHP support
Vi/etc/nginx/sites-available/default
Index to add index.php, and the relevant PHP part of the comment cancellation, note that you need to modify the Fastcgi_param path
Location ~ \.php$ {
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename /var/www/nginx-default$fastcgi_script_name;
Include/etc/nginx/fastcgi_params;
}
(5) Start service
/etc/init.d/php-cgi start
/etc/init.d/nginx start
The Web server is configured.
Job 2: Configure Squid Proxy Server
This is the main purpose, or do not have to deliberately choose Xen vps. I'll talk to you next time.