nginx一般配置

server{
    listen 80;
    server_name www.test.com;
    root /vagrant/web/test;

    location / {
        index  index.php;
    }


    location ~ \.php$ {
       fastcgi_pass unix:/var/run/php5-fpm.sock;
       # fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

}

ubuntu 时区不对问题

设置电脑的时区为上海

代码:

sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime


你可能感兴趣的:(nginx一般配置)