Openstack Kilo仪表板向前

时间:2015-08-10 11:12:47

标签: python django openstack-horizon

我在局域网中设置了Kilo,外部网络无法访问。现在,我想做一个转发,让它从外面访问。如何设置 ProxyPass ProxyPassReverse

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

有人可以帮忙吗?

P.S。 (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>

1 个答案:

答案 0 :(得分:0)

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

ServerAlias external.domain.name