diff --git a/openstack-dashboard.conf b/openstack-dashboard.conf
new file mode 100644
index 0000000..a2a488f
--- /dev/null
+++ b/openstack-dashboard.conf
@@ -0,0 +1,40 @@
+
+ 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/"
+
+
+ Options FollowSymLinks
+ AllowOverride None
+
+
+
+ Options Indexes FollowSymLinks MultiViews
+ AllowOverride None
+ # Apache 2.4 uses mod_authz_host for access control now (instead of
+ # "Allow")
+
+ Order allow,deny
+ Allow from all
+
+ = 2.4>
+ Require all granted
+
+
+ = 2.4>
+ ErrorLogFormat "%{cu}t %M"
+
+ ErrorLog /var/log/httpd/horizon_error.log
+ LogLevel warn
+ CustomLog /var/log/httpd/horizon_access.log combined
+
+
+WSGISocketPrefix /var/run/httpd
diff --git a/openstack-dashboard.conf.sample b/openstack-dashboard.conf.sample
deleted file mode 100644
index 8fe3f04..0000000
--- a/openstack-dashboard.conf.sample
+++ /dev/null
@@ -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)
-#
-
-
- 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
-
-
- SetOutputFilter DEFLATE
- ExpiresActive On
- ExpiresDefault "access plus 1 month"
-
-
-
- Options FollowSymLinks MultiViews
- AllowOverride None
- Require all granted
-
-
-
-
-
-
-
-# Uncomment the following if you want to redirect all HTTP traffic to HTTPS.
-# Make sure to comment out the above
-#RewriteEngine On
-#RewriteCond %{SERVER_PORT} ^80$
-#RewriteRule / https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
-
-
- 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
-
-
- ExpiresActive on
- ExpiresDefault "access plus 1 month"
-
-
-
- SetOutputFilter DEFLATE
- ExpiresActive On
- ExpiresDefault "access plus 1 month"
-
-
-
- Options FollowSymLinks MultiViews
- AllowOverride None
- Require all granted
-
-
-
-
-
-
diff --git a/openstack-horizon.spec b/openstack-horizon.spec
index c39f9ef..bb9da04 100644
--- a/openstack-horizon.spec
+++ b/openstack-horizon.spec
@@ -2,13 +2,13 @@
Name: openstack-horizon
Version: 18.6.1
-Release: 2
+Release: 3
Summary: OpenStack Dashboard (Horizon)
License: ASL 2.0
Group: Development/Languages/Python
URL: https://wiki.openstack.org/OpenStackDashboard
Source0: horizon-18.6.1.tar.gz
-Source1: openstack-dashboard.conf.sample
+Source1: openstack-dashboard.conf
# https://review.openstack.org/#/c/635159/
Patch0: 0001-Do-not-set-COMPRESS_ENABLED-explicitly.patch
BuildRequires: fdupes
@@ -160,7 +160,7 @@ for the OpenStack Dashboard (Horizon).
%autosetup -p1 -n horizon-18.6.1
%py_req_cleanup
-# Fix manage.py shebang
+# Fix manage.py python3 support
sed -i 's#%{_bindir}/env python#%{_bindir}/python3#' manage.py
%build
@@ -198,17 +198,13 @@ rm -v %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/*secret_key_st
# Remove duplicate files
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
%doc README.rst
%{http_dashboard_dir}
-%attr(0750, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/openstack_dashboard/local
-%attr(0640, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/openstack_dashboard/local/__init__.py*
-%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
+%attr(0755, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/
+%{apache_conf_dir}/openstack-dashboard.conf
%files -n python3-horizon
%license LICENSE
@@ -220,7 +216,11 @@ install -D -m 644 %{SOURCE1} %{buildroot}%{apache_conf_dir}/openstack-dashboard.
%{python3_sitelib}/openstack_auth
%changelog
+* Thu Feb 25 2021 wangxiyuan
+- Fix httpd config error
+
* Sat Feb 20 2021 huangtianhua
- Change to use python-enmerkar instead of django-babel
+
* Tus Feb 09 2021 wangxiyuan
- Init the first openstack victoria release