Hello i am trying to configure an nginx web server to serve different frameworks from different subdomains. As well as serving a site on the main domain. For example
- example.com - serves the main website
- site1.wp.example.com - serves a wordpress website
- site2.ci.example.com - serves a codeigniter website
- site3.la.example.com - serves a laravel website
The problem i am having is this capture is capturing the example.com address:
server_name ~^(www\.)?(?<vhost>.+)\.wp\.example\.com$;
This is shown in the error logs
"/var/www//web" existence failed (2: No such file or directory) while logging request,
client: xxx.xxx.xxx.xx,
server: ~(www\.)?(?<vhost>.+)\.wp\.example\.com$,
request: "GET / HTTP/2.0",
upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock",
host: "example.com"
I thought that .+ meant you had to match 1 or more ?