Estou tentando exibir um arquivo Autodiscover.xml usando o Nginx:
Abaixo está minha configuração:
upstream autodiscoverexamplecoukbackend {
server unix:/var/run/php-fcgi-autodiscoverexamplecouk.sock;
}
server {
listen 80;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/autodiscover.example.co.uk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/autodiscover.example.co.uk/privkey.pem;
server_name autodiscover.example.co.uk;
root /var/www/vhosts/autodiscover.example.co.uk/htdocs;
index index.html;
error_log /var/www/vhosts/autodiscover.example.co.uk/error.log;
access_log /var/www/vhosts/autodiscover.example.co.uk/access.log combined;
#location ^~ /autodiscover/ {
#index autodiscover.php;
#rewrite ^/.*$ /autodiscover.php last;
#}
location ~* /autodiscover/ {
rewrite ^/autodiscover/autodiscover\.xml$ /autodiscover/autodiscover.php last;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass autodiscoverexamplecoukbackend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_intercept_errors on;
}
}
O problema é que não é possível exibir o arquivo Autodiscover.xml quando solicitado com o caractere maiúsculo A
Se alguém puder ajudar, isso seria ótimo.
Quando o Autodiscover.xml é solicitado, ele deve ser revertido para o autodiscover.php, que servirá .autodisocver.xml de volta. Ele faz isso para poder servir diferentes domínios.
O arquivo está localizado em /autodiscover/autodiscover.php
Log de erros do Nginx:
2017/01/25 21:34:12 [error] 29385#29385: *93 open() "/var/www/vhosts/autodiscover.example.co.uk/htdocs/Autodiscover/Autodiscover.xml" failed (2: No such file or directory), client: 13.67.59.89, server: autodiscover.example.co.uk, request: "POST /Autodiscover/Autodiscover.xml HTTP/1.1", host: "autodiscover.example.co.uk"
2017/01/25 21:34:13 [error] 29385#29385: *94 open() "/var/www/vhosts/autodiscover.example.co.uk/htdocs/Autodiscover/Autodiscover.xml" failed (2: No such file or directory), client: 13.67.59.89, server: autodiscover.example.co.uk, request: "POST /Autodiscover/Autodiscover.xml HTTP/1.1", host: "autodiscover.example.co.uk"
2017/01/25 21:45:05 [error] 29385#29385: *108 stat() "/var/www/vhosts/autodiscover.example.co.uk/htdocs/Autodiscover/Autodiscover.xml" failed (2: No such file or directory), client: 13.67.59.89, server: autodiscover.example.co.uk, request: "POST /Autodiscover/Autodiscover.xml HTTP/1.1", host: "autodiscover.example.co.uk"
2017/01/25 21:45:05 [error] 29385#29385: *109 open() "/var/www/vhosts/autodiscover.example.co.uk/htdocs/Autodiscover/Autodiscover.xml" failed (2: No such file or directory), client: 13.67.59.89, server: autodiscover.example.co.uk, request: "POST /Autodiscover/Autodiscover.xml HTTP/1.1", host: "autodiscover.example.co.uk"
2017/01/25 21:56:15 [error] 29485#29485: *121 open() "/var/www/vhosts/autodiscover.example.co.uk/htdocs/Autodiscover/Autodiscover.xml" failed (2: No such file or directory), client: 13.67.59.89, server: autodiscover.example.co.uk, request: "POST /Autodiscover/Autodiscover.xml HTTP/1.1", host: "autodiscover.example.co.uk"
2017/01/25 21:56:16 [error] 29485#29485: *122 open() "/var/www/vhosts/autodiscover.example.co.uk/htdocs/Autodiscover/Autodiscover.xml" failed (2: No such file or directory), client: 13.67.59.89, server: autodiscover.example.co.uk, request: "POST /Autodiscover/Autodiscover.xml HTTP/1.1", host: "autodiscover.example.co.uk"