Apache HTTPD configuration to allow easy upgrading of OS

· by Tim Hughes · Read in about 1 min · (59 words)

mkdir /mnt/media/www/conf
 ln -s /mnt/media/www/conf /etc/httpd/conf.d/local


include conf.d/local/*.conf

semanage fcontext -a -t httpd_sys_content_t "/mnt/media/www(/.*)?"
semanage fcontext -a -t httpd_config_t "/mnt/media/www/conf(/.*)?"
restorecon -Rv /mnt/media/www


<VirtualHost _default_:*>
    ServerAdmin [email protected]
    DocumentRoot /mnt/media/www/vhosts/default/html/
    ErrorLog logs/default-error_log
    TransferLog logs/default-access_log

    <Directory "/mnt/media/www/vhosts">
        AllowOverride None
        # Allow open access:
        Require all granted
    <Directory "/mnt/media/www/vhosts/default/html">
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted