linux nginx配置81端口用于访问web81

多配置一个default81.conf文件

server {
    listen       81;
    server_name  localhost;
    root   /data/web81;

    error_page   500 502 503 504  /50x.html;

    location ~ \.php$ {
        fastcgi_pass unix:/dev/shm/php-cgi.sock;
#        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

   # include        location.conf;
}

 

你可能感兴趣的:(linux)