所有对http://example.com
的请求都重定向到https,然后将代理传递到我的应用程序服务器。到目前为止,一切都很好。
现在,我要拒绝对特定子文件夹http://example.com/dev
的所有请求。我该怎么做?
<VirtualHost *:80>
ServerName example.com
Redirect permanent "/" "https://example.com/"
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
<Location />
ProxyPass http://127.0.0.1:8080/
ProxyPassReverse http://127.0.0.1:8080/
</Location>
SSLEngine on
SSLCertificateFile "${SRVROOT}/conf/ssl/server.crt"
SSLCertificateKeyFile "${SRVROOT}/conf/ssl/server.key"
SSLCertificateChainFile "${SRVROOT}/conf/ssl/intermediate.crt"
</VirtualHost>