Developers Documentation



301 error for file:

User Tools

Site Tools

Custom Apache Web Server Configuration

This document describes how to customize an Apache configuration file for the default web site or virtual hosts.

In some circumstances, you may want to customize the Apache configuration files for your web sites. For the default web site (not virtual hosts), cut the relevant sections out of /etc/httpd/conf.d/flex-443.conf and /etc/httpd/conf.d/flex-80.conf and paste them into clearos.default.conf. Here is a sample from a test system:

  ServerName clear6.lan
  DocumentRoot /var/www/html
  ErrorLog /var/log/httpd/error_log
  CustomLog /var/log/httpd/access_log combined
  SSLEngine on
  SSLCertificateFile /etc/pki/tls/certs/localhost.crt
  SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
  # No weak export crypto allowed
  SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0

  ServerName clear6.lan
  DocumentRoot /var/www/html
  ErrorLog /var/log/httpd/error_log
  CustomLog /var/log/httpd/access_log combined

  Options +Indexes -FollowSymLinks -IncludesNOExec
  AllowOverride All
  Order deny,allow
  Allow from all
  AddType text/html .php
  AddHandler php5-script .php

You can change this configuration file meet your needs and the ClearOS Web Server app will not overwrite it. Please do not forget to restart the web server after making the custom changes.

When you go to the Web Server app in ClearOS, you will see a warning message about your custom configuration. You can still change the upload access permissions via the ClearOS web interface, but the Apache configuration will remain unchanged.

content/en_us/kb_o_custom_apache_web_server_configuration.txt · Last modified: 2015/03/01 19:43 (external edit)