1.1. Update Apache Config¶
The tool used to update an Apache configuration file that describes an OOD Portal is maintained by the ood-portal-generator project. Assuming you previously installed it with Generate Apache Config you can update it with the following directions.
1.1.1. Do I need to update?¶
You can compare this to the OOD Portal Apache configuration file you have installed locally with the following command:
grep 'Generated using template' /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf #=> # Generated using template v0.4.0
where the version number should be given at the end of the line. If the version numbers match then you can skip this update.
1.1.2. Instructions to update¶
Fetch the latest changes and check out the latest tag of ood-portal-generator:
cd ~/ood/src/ood-portal-generator scl enable git19 -- git fetch scl enable git19 -- git checkout v0.4.0
Confirm your original configuration file is in this root directory and you are happy with the configuration:
Rebuild the Apache configuration file under the build/ directory:
scl enable rh-ruby22 -- rake # => mkdir -p build # => rendering templates/ood-portal.conf.erb => build/ood-portal.conf
Confirm the changes between the built Apache config and your locally installed Apache config:diff build/ood-portal.conf /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf
In fact you should save the locally installed Apache config in case anything goes wrong.
Copy this built Apache config to the default installation location:
sudo scl enable rh-ruby22 -- rake install # => cp build/ood-portal.conf /opt/rh/httpd24/root/etc/httpd/conf.d/ood-portal.conf
Restart the Apache server:
sudo service httpd24-httpd restart
If using RHEL 7 you will need to replace the above command with:
sudo systemctl restart httpd24-httpd