1.3.2 Configuring an Existing Apache HTTP Server

The instructions in this section are for configuring an HTTP directory on Oracle Linux 7 systems. For instructions on configuring HTTP directories on Oracle Linux 6 systems, see the Oracle Linux 6 Administrator's Guide.

To configure an existing Apache HTTP server:

  1. Create the directory that will be used to store the contents of the full installation ISO image.

    Create the directory under the DocumentRoot hierarchy that is defined in the HTTP server configuration file (/etc/httpd/conf/httpd.conf), for example /var/www/html/OSimage/OL7.

    # mkdir -p /var/www/html/OSimage/OL7
  2. Extract the contents of the full installation ISO image to the HTTP directory.

    See Section 1.2.3, “Extracting the Contents of the Full Installation ISO Image”.

  3. Edit the HTTP server configuration file, /etc/httpd/conf/httpd.conf, and add a <Directory> section.

    For example:

    <Directory "/var/www/html/OSimage/OL7">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
        Require all granted

    Place this section after the closing </Directory> statement for the <Directory DocumentRoot> section.

    The Indexes option is only required if you want to be able to browse the directory hierarchy, it is not required for installation.

  4. If SELinux is enabled in enforcing mode and you extracted the ISO image to a directory that is not under /var/www/html, use the semanage and restorecon commands to restore the SELinux security context on the extracted files.

    The semanage and restorecon commands are provided by the policycoreutils-python and policycoreutils packages.

    1. Use the semanage command to define the default file type of the directory hierarchy as httpd_sys_content_t:

      # /usr/sbin/semanage fcontext -a -t httpd_sys_content_t "/var/OSimage(/.*)?"

    2. Use the restorecon command to apply the file type to the entire directory hierarchy.

      # /sbin/restorecon -R -v /var/OSimage

    See the httpd_selinux(8) manual page for more information.