Openstack的仪表板转发



我已经在局域网中设置了Kilo,外部网络无法访问。现在,我想做一个转发,使它可以从外部访问。如何设置ProxyPassProxyPassReverse?

我问这个是因为对于Kilo仪表板,登录装饰器将重定向http://host.ip/dashboard -> http://host.ip/dashboard/auth/login/?next=/dashboard/。因此,通过转发的访问将失败。

有人能帮忙吗?

注:(apache配置)

# ************************************
# Vhost template in module puppetlabs-apache
# Managed by Puppet
# ************************************
<VirtualHost *:80>
  ServerName xxx.xxx.com
  ## Vhost docroot
  DocumentRoot "/var/www/"
  ## Alias declarations for resources outside the DocumentRoot
  Alias /dashboard/static "/usr/share/openstack-dashboard/static"
  ## Directories, there should at least be a declaration for /var/www/
  <Directory "/var/www/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Require all granted
  </Directory>
  ## Logging
  ErrorLog "/var/log/httpd/horizon_error.log"
  ServerSignature Off
  CustomLog "/var/log/httpd/horizon_access.log" combined 
  ## RedirectMatch rules
  RedirectMatch permanent  ^/$ /dashboard
  ## Server aliases
  ServerAlias 10.xxx.xxx.xxx
  ServerAlias xxx.xxx.com
  ServerAlias localhost
  WSGIDaemonProcess dashboard group=apache processes=3 threads=10 user=apache
  WSGIProcessGroup dashboard
  WSGIScriptAlias /dashboard "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi"
</VirtualHost>

问题现已修复。现在它起作用了。解决方案是:将外部域名http://external.domain.name/作为serverAlias添加到virtualHost配置中,如下所示:

ServerAlias external.domain.name

最新更新