title: Allow .htaccess on apache2+nginx?
body: <p>Is there a way to make apache2 consider .htaccess files when the server also uses nginx?</p>
  
  <p>I'm trying to configure my localhost the same way as our hosting works, they have Plesk panel and all the traffic comes through nginx and then is forwarded to apache that handles PHP and the .htaccess does work there.</p>
  
  <p>Currently I have this in the apache's site-enabled config:</p>
  
  <pre><code>&lt;VirtualHost 127.0.0.1:8080&gt;
      ServerAdmin webmaster@localhost
      ServerName my.domain.name
      DocumentRoot /var/www/my.domain.name
      ErrorLog ${APACHE_LOG_DIR}/my.domain.name.error.log
      CustomLog ${APACHE_LOG_DIR}/my.domain.name.access.log combined
  
      &lt;Directory "/var/www/my.domain.name/"&gt;
          Options FollowSymLinks Indexes
          AllowOverride All
          Order deny,allow
          allow from All
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and nginx sites-enabled:</p>
  
  <pre><code>server {
      listen   80;
  
      root /var/www/my.domain.name/;
      index index.php index.html index.htm;
  
      server_name my.domain.name;
  
      location / {
      try_files $uri $uri/ /index.php;
      }
  
      location ~ \.php$ {
  
      proxy_set_header X-Real-IP  $remote_addr;
      proxy_set_header X-Forwarded-For $remote_addr;
      proxy_set_header Host $host;
      proxy_pass http://127.0.0.1:8080;
  
       }
  
       location ~ /\.ht {
              deny all;
      }
  }
  </code></pre>
  
  <p>I tried changing <code>location ~ /\.ht</code> to <code>allow all</code> and also completely removing it and still no luck.</p>