1. 程式人生 > >lnmp一鍵安裝包 配置多站點

lnmp一鍵安裝包 配置多站點

param div local clu cgi entos lnmp一鍵安裝 cat www.

在/usr/local/nginx/conf/vhost下配置多站點的文件,一個站點對應一個文件,配置如下信息:

vim ./vhost/test.conf

server {
    listen       80; 
    server_name  www.centos.com    centos.com;
    root   /home/wwwroot/test;
    location / {
        index index.php;
        #autoindex on;
    }   

    location ~ \.php$ {
        include /usr/local/nginx/conf/fastcgi.conf; 
        fastcgi_pass unix:
/tmp/php-cgi.sock; fastcgi_param SCRIPT_FILENAME /home/wwwroot/test$fastcgi_script_name; } }

vim ./vhost/mytest.conf

server {
    listen       80; 
    server_name  www.centostest.com    centostest.com;
    root   /home/wwwroot/centostest;
    location / {
        index index.php;
        #autoindex on;
    }   

    location 
~ \.php$ { include /usr/local/nginx/conf/fastcgi.conf; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_param SCRIPT_FILENAME /home/wwwroot/centostest$fastcgi_script_name; } }

lnmp一鍵安裝包 配置多站點