I'm trying to use the new feature from 0.7.40 - captures in server_name. <br>I use $document_root in SCRIPT_FILENAME for fastcgi. The problem is that the captured part of server_name is not being used. If I check my access log, it will say this:<br>
404 .... /var/www/htdocs//index.php<br><br>For a regular index.php, the path will be correct and the captured part will be in it:<br>200 .... /var/www/htdocs/domain/index.html<br><br>This is the gist of my config:<br><br>
server {<br> listen 80;<br> server_name ~^(www\.)?(.+)\.(.+)$;<br> root /var/www/htdocs/$2;<br><br> log_format main '$status "$request" $body_bytes_sent $remote_addr $document_root$fastcgi_script_name';<br>
....<br><br> location ~ .php$ { <br> fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;<br> ... # normal fastcgi params<br> }<br> }<br>}<br><br>Is this a bug or an incorrect config on my part?<br><br><br>thank you,<br>Sergej<br><br>