nginx配置一個Ip多埠多站
在/usr/local/nginx/conf/vhost目錄下新建一個.conf檔案,內容
server
{
listen 埠1;
#listen [::]:80;
server_name IP地址;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/網站專案資料夾;
include none.conf;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log off;
}
---------------------
作者:童大大
來源:CSDN
原文:https://blog.csdn.net/tongdengquan/article/details/64920139?utm_source=copy
版權宣告:本文為博主原創文章,轉載請附上博文連結!