title: nginx alternative index not working
body: <p>Trying to get login.php or /login to be the index page when going to a subdomain but all I get is a blank page.</p>
  
  <p>Config below:</p>
  
  <pre><code>server {
      listen       80;
      server_name  *.domain.org;
  
      root   /var/www/html/domain.org/public;
      index login login.php index.php index.html index.htm;
  
      location ~* \.(css|js|png|woff2|woff|ttf|jpg|jpeg|gif|ico)$ {}
  
      location = / {
        index login.php;
      }
  
      location / {
          try_files $uri $uri.php login;
          rewrite ^(.*)$ $uri.php;
      }
  
      error_page 404 404;
  
      location ~ \.php$ {
          try_files $uri =404;
          fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          include fastcgi_params;
      }
  }
  </code></pre>