enabling the ws api install
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10958 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
95ca0b5146
commit
f4de3dc47f
@ -20,7 +20,7 @@ AutoReqProv: no
|
||||
# also need to fix Requires for AIX
|
||||
%ifos linux
|
||||
BuildArch: noarch
|
||||
Requires: perl-IO-Socket-SSL perl-XML-Simple perl-IO-Tty perl-Crypt-SSLeay make
|
||||
Requires: perl-IO-Socket-SSL perl-XML-Simple perl-IO-Tty perl-Crypt-SSLeay mod_ssl make
|
||||
%endif
|
||||
|
||||
Requires: perl-xCAT >= %{epoch}:%(cat Version|cut -d. -f 1,2)
|
||||
@ -157,6 +157,13 @@ cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-server
|
||||
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-server/*
|
||||
#echo $RPM_BUILD_ROOT %{prefix}
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{prefix}/ws
|
||||
cp xCAT-wsapi/* $RPM_BUILD_ROOT/%{prefix}/ws
|
||||
echo "ScriptAlias /xcatws %{prefix}/ws/xcatws.cgi" > $RPM_BUILD_ROOT/wstemp.txt
|
||||
cat $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf >> $RPM_BUILD_ROOT/wstemp.txt
|
||||
mv $RPM_BUILD_ROOT/wstemp.txt $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
@ -211,6 +218,26 @@ if [ "$1" -gt "1" ]; then #only on upgrade for AIX...
|
||||
fi
|
||||
fi
|
||||
%endif
|
||||
|
||||
#Web Service
|
||||
%ifos linux
|
||||
if [ -e "/etc/redhat-release" ]; then
|
||||
apachedaemon='httpd'
|
||||
#apacheuser='apache'
|
||||
else #SUSE
|
||||
apachedaemon='apache2'
|
||||
#apacheuser='wwwrun'
|
||||
fi
|
||||
|
||||
/bin/rm -f /etc/$apachedaemon/conf.d/xcat-ws.conf
|
||||
mkdir -p /etc/$apachedaemon/conf.d/
|
||||
/bin/ln -s %{prefix}/ws/xcat-ws.conf /etc/$apachedaemon/conf.d/
|
||||
|
||||
# Restart Apache Web Server
|
||||
#/etc/init.d/$apachedaemon reload
|
||||
|
||||
%endif
|
||||
|
||||
exit 0
|
||||
|
||||
%preun
|
||||
@ -227,6 +254,17 @@ if [ $1 == 0 ]; then #This means only on -e
|
||||
rm -f /usr/sbin/xcatd #remove the symbolic
|
||||
fi
|
||||
%endif
|
||||
%ifos linux
|
||||
if [ -e "/etc/redhat-release" ]; then
|
||||
apachedaemon='httpd'
|
||||
#apacheuser='apache'
|
||||
else #SUSE
|
||||
apachedaemon='apache2'
|
||||
#apacheuser='wwwrun'
|
||||
fi
|
||||
|
||||
/bin/rm -f /etc/$apachedaemon/conf.d/xcat-ws.conf
|
||||
%endif
|
||||
|
||||
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
ScriptAlias /xcatws /var/www/cgi-bin/xcatws.cgi
|
||||
#LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
|
||||
#SSLCertificateFile /etc/httpd/conf/ssl.crt/b27.crt
|
||||
#SSLCertificateKeyFile /etc/httpd/conf/ssl.key/b27.key
|
||||
#RewriteEngine On
|
||||
#RewriteCond %{SERVER_PORT} 80
|
||||
#RewriteCond %{REQUEST_URI} xcatws
|
||||
#RewriteRule ^(.*)$ https://${HOSTNAME}$1 [R,L]
|
||||
|
||||
LoadModule ssl_module /etc/httpd/modules/mod_ssl.so
|
||||
RewriteEngine On
|
||||
RewriteCond %{SERVER_PORT} 80
|
||||
RewriteCond %{REQUEST_URI} xcatws
|
||||
RewriteRule ^(.*)$ https://${HOSTNAME}$1 [R,L]
|
||||
|
Loading…
Reference in New Issue
Block a user