.htaccess - HTTP Basic Auth not bring up password prompt in <Directory> but in <Location> in Apache 2.4 -


apache version: 2.4.17

vhost.config:

listen 1449  <virtualhost *:1449>      directoryindex /index.php index.php      servername 200.000.000.00:1449      serveradmin myname      proxypassmatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:5000/custom/$1       documentroot /custom      <directory /custom>          options -indexes -includes          allowoverride none          allow          authbasicprovider file          authname "restricted area"           authtype basic           authuserfile "/passward/.main"           require valid-user      </directory>  </virtualhost> 

the general directory tag in http.config:

<directory />      <limitexcept post head>          deny    </limitexcept>      options -indexes     allowoverride none     require denied  </directory> 

i have vhost exact same setting , password , working. have no idea why not working in specific virtual host in port 1449. when browse @ 200.000.000.00:1449/custom/some.php, doesn't bring dialog asking password. goes straight page. have use <location> tags bring password prompt, have read isn't safer <directory>. no error log @ all. mysterious me.

can figure out wrong setting?

updated:

working:

<location />     authtype basic      .....  </location> 

not working:

<directory />        authtype basic         .....  </directory> 

not working:

<files "some.php">         authtype basic          .....  </files> 

the file path:

  /custom/some.php 0644 

when use proxypass/proxypassmatch, request never mapped location on disk, can't use <directory> sections.

there alternate form of fcgi uses sethandler instead of proxypass/proxypassmatch (it's in manual) delays execution , allows normal mapping disk happen. give try if need it.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -