Subversion Repositories ALCASAR

Rev

Rev 3269 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3269 Rev 3281
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 3269 2025-04-21 21:57:13Z rexy $
2
# $Id: alcasar-conf.sh 3281 2025-05-14 21:50:06Z rexy $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.sh
5
# by REXY
5
# by REXY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 349... Line 349...
349
		rm -f /tmp/hosts
349
		rm -f /tmp/hosts
350
# MOTD
350
# MOTD
351
		$SED "s@'https://\(.\+\)/acc'@'https://$HOSTNAME.$DOMAIN/acc'@" /etc/mageia-release
351
		$SED "s@'https://\(.\+\)/acc'@'https://$HOSTNAME.$DOMAIN/acc'@" /etc/mageia-release
352
# httpd
352
# httpd
353
		$SED "s/^ServerName.*/ServerName $HOSTNAME.$DOMAIN/g" /etc/httpd/conf/httpd.conf
353
		$SED "s/^ServerName.*/ServerName $HOSTNAME.$DOMAIN/g" /etc/httpd/conf/httpd.conf
354
		$SED "s/^\tErrorDocument.*/\tErrorDocument 404 https:\/\/$HOSTNAME.$DOMAIN\//g" /etc/httpd/conf/webapps.d/alcasar.conf
354
		$SED "s?^\tErrorDocument.*?\tErrorDocument 404 https://$HOSTNAME.$DOMAIN/?g" /etc/httpd/conf/webapps.d/alcasar.conf
355
		$SED "s/^\tAuthDigestDomain.*/\tAuthDigestDomain $HOSTNAME.$DOMAIN/g" /etc/httpd/conf/webapps.d/alcasar.conf
355
		$SED "s?^\tAuthDigestDomain.*?\tAuthDigestDomain $HOSTNAME.$DOMAIN?g" /etc/httpd/conf/webapps.d/alcasar.conf
356
		$SED "s/^    ServerName.*/    ServerName $HOSTNAME.$DOMAIN/g" /etc/httpd/conf/vhosts.d/00_default_vhosts.conf /etc/httpd/conf/vhosts.d/00_default_ssl_vhost.conf
356
		$SED "s/^    ServerName.*/    ServerName $HOSTNAME.$DOMAIN/g" /etc/httpd/conf/vhosts.d/00_default_vhosts.conf /etc/httpd/conf/vhosts.d/00_default_ssl_vhost.conf
357
		$SED "s?^Listen.*?Listen $PRIVATE_IP:80?g" /etc/httpd/conf/httpd.conf
357
		$SED "s?^Listen.*?Listen $PRIVATE_IP:80?g" /etc/httpd/conf/httpd.conf
358
		FIC_MOD_SSL=`find /etc/httpd/conf/ -type f -name ssl.conf`
358
		FIC_MOD_SSL=`find /etc/httpd/conf/ -type f -name ssl.conf`
359
		$SED "s?^Listen.*?Listen $PRIVATE_IP:443?g" $FIC_MOD_SSL
359
		$SED "s?^Listen.*?Listen $PRIVATE_IP:443?g" $FIC_MOD_SSL
360
		$SED "/127.0.0.1/!s?Allow from .*?Allow from $PRIVATE_NETWORK_MASK?g" /etc/httpd/conf/webapps.d/alcasar.conf
360
		$SED "/127.0.0.1/!s?Allow from .*?Allow from $PRIVATE_NETWORK_MASK?g" /etc/httpd/conf/webapps.d/alcasar.conf