我正在尝试使用 apache 安装 iredmail。但现在我遇到一个问题,我只能提供 python 文件iredadmin
或静态文件。我需要让它们都正常工作。
<Location "iredadmin/static">
Order allow,deny
Allow from all
Require all granted
Alias "/opt/www/iredadmin/static"
</Location>
Alias "/iredadmin/static" "/opt/www/iredadmin/static"
<Directory "iredadmin/static">
allow from all
Order allow,deny
Options Indexes
Require all granted
</Directory>
<Location "/iredadmin">
RewriteEngine On
RewriteRule ^/iredadmin(/.*)$ $l [L]
ProxyPreserveHost On
ProxyPass "uwsgi://127.0.0.1:7791"
ProxyPassReverse "uwsgi://127.0.0.1:7791"
</Location>
我尝试用 替换结构/iredadmin
。/iredadmin/static
还尝试了,但仍然面临问题。我可以禁用<LocationMatch "^\/iredadmin(?!\/static)(.*)">
代理<Location "/iredadmin">
,然后可以单独查看静态文件。或者保留两者并仅查看代理。