成都创新互联网站制作重庆分公司

【NGINX】使用带通配符的虚拟主机

配置如下

server {
    listen 80;
    server_name ~^remote\.(?.+)\.note\.loc$;
    root /var/www/app-$appname;

    location / {
            try_files $uri $uri/ /index.html /index.php$is_args$args;
      }
        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }
        location ~ \.php$ {
                fastcgi_buffers 8 16k;
                fastcgi_buffer_size 32k;
                fastcgi_intercept_errors on;
                include       fastcgi.conf;
                fastcgi_pass  unix:/var/run/php-fpm/www.sock;
        }
    access_log /var/log/nginx/${host}_access.log access;
}

文章题目:【NGINX】使用带通配符的虚拟主机
网站URL:http://cxhlcq.com/article/gjejds.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部