Fix horizon httpd config error
This commit is contained in:
parent
ac77ae0792
commit
57d16e4da6
40
openstack-dashboard.conf
Normal file
40
openstack-dashboard.conf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi.py
|
||||||
|
WSGIDaemonProcess horizon user=apache group=apache processes=3 threads=10 home=/usr/share/openstack-dashboard/ display-name=%{GROUP}
|
||||||
|
WSGIApplicationGroup %{GLOBAL}
|
||||||
|
|
||||||
|
SetEnv APACHE_RUN_USER horizon
|
||||||
|
SetEnv APACHE_RUN_GROUP horizon
|
||||||
|
WSGIProcessGroup horizon
|
||||||
|
|
||||||
|
Alias /dashboard/static /usr/share/openstack-dashboard/static
|
||||||
|
|
||||||
|
RedirectMatch "^/$" "/dashboard/"
|
||||||
|
|
||||||
|
<Directory />
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /usr/share/openstack-dashboard/>
|
||||||
|
Options Indexes FollowSymLinks MultiViews
|
||||||
|
AllowOverride None
|
||||||
|
# Apache 2.4 uses mod_authz_host for access control now (instead of
|
||||||
|
# "Allow")
|
||||||
|
<IfVersion < 2.4>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</IfVersion>
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
Require all granted
|
||||||
|
</IfVersion>
|
||||||
|
</Directory>
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
ErrorLogFormat "%{cu}t %M"
|
||||||
|
</IfVersion>
|
||||||
|
ErrorLog /var/log/httpd/horizon_error.log
|
||||||
|
LogLevel warn
|
||||||
|
CustomLog /var/log/httpd/horizon_access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
WSGISocketPrefix /var/run/httpd
|
||||||
@ -1,87 +0,0 @@
|
|||||||
#
|
|
||||||
# OpenStack Horizon (Dashboard) Apache2 example configuration.
|
|
||||||
#
|
|
||||||
# Required Apache2 modules:
|
|
||||||
# - mod_rewrite (If you use the port 80 -> 443 rewrite rule below)
|
|
||||||
# - mod_ssl (If you enable the HTTPS vhost)
|
|
||||||
#
|
|
||||||
|
|
||||||
<VirtualHost *:80>
|
|
||||||
ServerName openstack-dashboard.example.com
|
|
||||||
ServerAdmin webmaster@openstack-dashboard.example.com
|
|
||||||
|
|
||||||
ErrorLog /var/log/httpd/openstack-dashboard-error_log
|
|
||||||
TransferLog /var/log/httpd/openstack-dashboard-access_log
|
|
||||||
|
|
||||||
WSGIScriptAlias / /var/lib/openstack-dashboard/openstack_dashboard/wsgi.py
|
|
||||||
WSGIDaemonProcess horizon user=apache group=apache processes=3 threads=10
|
|
||||||
WSGIApplicationGroup %{GLOBAL}
|
|
||||||
WSGIProcessGroup horizon
|
|
||||||
SetEnv APACHE_RUN_USER apache
|
|
||||||
SetEnv APACHE_RUN_GROUP apache
|
|
||||||
|
|
||||||
DocumentRoot /var/lib/openstack-dashboard/
|
|
||||||
Alias /media /var/lib/openstack-dashboard/media
|
|
||||||
Alias /static /var/lib/openstack-dashboard/static
|
|
||||||
|
|
||||||
<Location /static>
|
|
||||||
SetOutputFilter DEFLATE
|
|
||||||
ExpiresActive On
|
|
||||||
ExpiresDefault "access plus 1 month"
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
<Directory /var/lib/openstack-dashboard/>
|
|
||||||
Options FollowSymLinks MultiViews
|
|
||||||
AllowOverride None
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
</VirtualHost>
|
|
||||||
|
|
||||||
|
|
||||||
<IfDefine SSL>
|
|
||||||
<IfDefine !NOSSL>
|
|
||||||
|
|
||||||
# Uncomment the following if you want to redirect all HTTP traffic to HTTPS.
|
|
||||||
# Make sure to comment out the above <VirtualHost *:80>
|
|
||||||
#RewriteEngine On
|
|
||||||
#RewriteCond %{SERVER_PORT} ^80$
|
|
||||||
#RewriteRule / https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
|
|
||||||
|
|
||||||
<VirtualHost *:443>
|
|
||||||
ServerName openstack-dashboard.example.com
|
|
||||||
ServerAdmin webmaster@openstack-dashboard.example.com
|
|
||||||
|
|
||||||
ErrorLog /var/log/httpd/openstack-dashboard-error_log
|
|
||||||
TransferLog /var/log/httpd/openstack-dashboard-access_log
|
|
||||||
|
|
||||||
SSLEngine On
|
|
||||||
# Generate those certificates by running
|
|
||||||
# (umask 377 ; /usr/bin/gensslcert -C openstack-dashboard -n $(hostname -fqdn))
|
|
||||||
SSLCertificateFile /etc/httpd/ssl.crt/openstack-dashboard-server.crt
|
|
||||||
SSLCertificateKeyFile /etc/httpd/ssl.key/openstack-dashboard-server.key
|
|
||||||
|
|
||||||
DocumentRoot /var/lib/openstack-dashboard/
|
|
||||||
Alias /media /var/lib/openstack-dashboard/media
|
|
||||||
Alias /static /var/lib/openstack-dashboard/static
|
|
||||||
|
|
||||||
<Location /static>
|
|
||||||
ExpiresActive on
|
|
||||||
ExpiresDefault "access plus 1 month"
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
<Location /static>
|
|
||||||
SetOutputFilter DEFLATE
|
|
||||||
ExpiresActive On
|
|
||||||
ExpiresDefault "access plus 1 month"
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
<Directory /var/lib/openstack-dashboard/>
|
|
||||||
Options FollowSymLinks MultiViews
|
|
||||||
AllowOverride None
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
</VirtualHost>
|
|
||||||
|
|
||||||
</IfDefine>
|
|
||||||
</IfDefine>
|
|
||||||
|
|
||||||
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
Name: openstack-horizon
|
Name: openstack-horizon
|
||||||
Version: 18.6.1
|
Version: 18.6.1
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: OpenStack Dashboard (Horizon)
|
Summary: OpenStack Dashboard (Horizon)
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://wiki.openstack.org/OpenStackDashboard
|
URL: https://wiki.openstack.org/OpenStackDashboard
|
||||||
Source0: horizon-18.6.1.tar.gz
|
Source0: horizon-18.6.1.tar.gz
|
||||||
Source1: openstack-dashboard.conf.sample
|
Source1: openstack-dashboard.conf
|
||||||
# https://review.openstack.org/#/c/635159/
|
# https://review.openstack.org/#/c/635159/
|
||||||
Patch0: 0001-Do-not-set-COMPRESS_ENABLED-explicitly.patch
|
Patch0: 0001-Do-not-set-COMPRESS_ENABLED-explicitly.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -160,7 +160,7 @@ for the OpenStack Dashboard (Horizon).
|
|||||||
%autosetup -p1 -n horizon-18.6.1
|
%autosetup -p1 -n horizon-18.6.1
|
||||||
%py_req_cleanup
|
%py_req_cleanup
|
||||||
|
|
||||||
# Fix manage.py shebang
|
# Fix manage.py python3 support
|
||||||
sed -i 's#%{_bindir}/env python#%{_bindir}/python3#' manage.py
|
sed -i 's#%{_bindir}/env python#%{_bindir}/python3#' manage.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -198,17 +198,13 @@ rm -v %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/*secret_key_st
|
|||||||
# Remove duplicate files
|
# Remove duplicate files
|
||||||
rm -f %{buildroot}%{http_dashboard_dir}/openstack_dashboard/.eslintrc
|
rm -f %{buildroot}%{http_dashboard_dir}/openstack_dashboard/.eslintrc
|
||||||
|
|
||||||
install -D -m 644 %{SOURCE1} %{buildroot}%{apache_conf_dir}/openstack-dashboard.conf.sample
|
install -D -m 644 %{SOURCE1} %{buildroot}%{apache_conf_dir}/openstack-dashboard.conf
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{http_dashboard_dir}
|
%{http_dashboard_dir}
|
||||||
%attr(0750, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/openstack_dashboard/local
|
%attr(0755, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/
|
||||||
%attr(0640, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/openstack_dashboard/local/__init__.py*
|
%{apache_conf_dir}/openstack-dashboard.conf
|
||||||
%config(noreplace) %attr(0640, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/openstack_dashboard/local/local_settings.py*
|
|
||||||
%attr(0770, root, %{apache_group}) %{http_dashboard_dir}/static/
|
|
||||||
%attr(0770, root, %{apache_group}) %{http_dashboard_dir}/media/
|
|
||||||
%{apache_conf_dir}/openstack-dashboard.conf.sample
|
|
||||||
|
|
||||||
%files -n python3-horizon
|
%files -n python3-horizon
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -220,7 +216,11 @@ install -D -m 644 %{SOURCE1} %{buildroot}%{apache_conf_dir}/openstack-dashboard.
|
|||||||
%{python3_sitelib}/openstack_auth
|
%{python3_sitelib}/openstack_auth
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 25 2021 wangxiyuan <wangxiyuan1007@gmail.com>
|
||||||
|
- Fix httpd config error
|
||||||
|
|
||||||
* Sat Feb 20 2021 huangtianhua <huangtianhua223@gmail.com>
|
* Sat Feb 20 2021 huangtianhua <huangtianhua223@gmail.com>
|
||||||
- Change to use python-enmerkar instead of django-babel
|
- Change to use python-enmerkar instead of django-babel
|
||||||
|
|
||||||
* Tus Feb 09 2021 wangxiyuan <wangxiyuan1007@gmail.com>
|
* Tus Feb 09 2021 wangxiyuan <wangxiyuan1007@gmail.com>
|
||||||
- Init the first openstack victoria release
|
- Init the first openstack victoria release
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user