diff --git a/xCAT-server/debian/postrm b/xCAT-server/debian/postrm index d2b136a25..4c92dbf3e 100644 --- a/xCAT-server/debian/postrm +++ b/xCAT-server/debian/postrm @@ -30,7 +30,7 @@ case "$1" in update-rc.d xcatd disable rm -f /usr/sbin/xcatd #remove the symbolic - rm -f /etc/apache2/conf.d/xcat-ws.conf + rm -f /etc/apache2/conf-enabled/xcat-ws.conf ;; *) diff --git a/xCAT-server/debian/rules b/xCAT-server/debian/rules index 410c07bb6..027559171 100755 --- a/xCAT-server/debian/rules +++ b/xCAT-server/debian/rules @@ -66,9 +66,10 @@ binary-arch: chmod 644 $(rootdir)/lib/perl/xCAT_schema/samples/* chmod 644 $(rootdir)/lib/shfunctions chmod 644 $(rootdir)/share/doc/packages/xCAT-server/* - echo "ScriptAlias /xcatws $(prefix)/ws/xcatws.cgi" > $(buildroot)/etc/apache2/conf.d/xcat-ws.conf - cat $(PWD)/xCAT-wsapi/xcat-ws.conf.ubuntu >> $(buildroot)/etc/apache2/conf.d/xcat-ws.conf + echo "ScriptAlias /xcatws $(prefix)/ws/xcatws.cgi" > $(buildroot)/etc/apache2/conf-available/xcat-ws.conf + cat $(PWD)/xCAT-wsapi/xcat-ws.conf.ubuntu >> $(buildroot)/etc/apache2/conf-available/xcat-ws.conf rm -rf $(rootdir)/ws/xcat-ws.conf* + ln -s ../conf-available/xcat-ws.conf $(buildroot)/etc/apache2/conf-enabled/xcat-ws.conf # dh_installmenu # dh_installdebconf # dh_installlogrotate diff --git a/xCAT-server/xCAT-wsapi/xcat-ws.conf.ubuntu b/xCAT-server/xCAT-wsapi/xcat-ws.conf.ubuntu index 48ef8bb6b..1609e7160 100644 --- a/xCAT-server/xCAT-wsapi/xcat-ws.conf.ubuntu +++ b/xCAT-server/xCAT-wsapi/xcat-ws.conf.ubuntu @@ -1,11 +1,11 @@ LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so +LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} xcatws RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [R,L] - Order allow,deny - Allow from all + Require all granted