[VPS]VPS快速架设
完全根据教程digitalocean, DO的服务器是很好的,号称linode杀手!
自己架设一个简单的VPS服务器,可以用于博客,科学上网,python程序等等,功能多多,价格不贵哦
正式安装
1. mysql install:
2. install php5
3. nginx:
4. 配置 nginx
[text]
server {
listen 80;
root /usr/share/nginx/www;
index index.php index.html index.htm;
server_name example.com;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
# pass the PHP scripts to FastCGI server listening on the php-fpm socket
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
[/text]
5. 创建一个新的info.php 测试文件:
phpinfo();
?>