我想通过指定子域将nginx设置为使用多租户,但这样做有问题。这是我的Nginx配置文件,位于/ etc / nginx / sites-available / default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/laravelJamisi/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name app.jameson.org, *.jameson.org ,51.75.253.63;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$query_string;
}
location ~* \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
location ~ /\.ht {
deny all;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/app.jamisi.org/fullchain.pem; # manag$
ssl_certificate_key /etc/letsencrypt/live/app.jamisi.org/privkey.pem; # man$
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
我尝试将通配符添加到我的域中,但是不起作用。我拥有的域是app.jameson.org。如何配置子域以允许多租户行为?