Configure Default Apache Index Page: Difference between revisions

From Research
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
== Enable Includes in Default VHost ==
== Enable Includes in Default VHost ==


=== SuSE ===
'''SuSE'''
 
/etc/apache2/default-server.conf
/etc/apache2/default-server.conf
  <Directory "/srv/www/htdocs">
  <Directory "/srv/www/htdocs">
Line 12: Line 13:
  </Directory>
  </Directory>


=== Gentoo ===
'''Gentoo'''
 
An unused setup should have DEFAULT_VHOST option set in: /etc/conf.d/apache2:
An unused setup should have DEFAULT_VHOST option set in: /etc/conf.d/apache2:
  APACHE2_OPTS="-D DEFAULT_VHOST"
  APACHE2_OPTS="-D DEFAULT_VHOST"
/etc/apache2/vhosts.d/00_default_vhost.conf
/etc/apache2/vhosts.d/00_default_vhost.conf
Configure Options Includes
Make sure 'Options' has 'Includes'
  <Directory "/var/www/localhost/htdocs">
  <Directory "/var/www/localhost/htdocs">
     Options Includes
     Options Includes
Line 22: Line 24:
  </Directory>
  </Directory>


== AddType ==
=== AddType ===
In /etc/apache2/mod_mime-defaults.conf OR /etc/apache2/httpd.conf uncomment:
In /etc/apache2/mod_mime-defaults.conf OR /etc/apache2/httpd.conf uncomment:
  AddType text/html .shtml
  AddType text/html .shtml
  AddOutputFilter INCLUDES .shtml
  AddOutputFilter INCLUDES .shtml


== Copy Default Research Webpage ==
=== Copy Default Research Webpage ===
Change to your root web directory, /var/www/localhost/htdocs or /srv/www/htdocs
Change to your root web directory, /var/www/localhost/htdocs or /srv/www/htdocs
  # cd /var/www/localhost/htdocs
  # cd /var/www/localhost/htdocs
  # scp -p root@tirpitz:/home/projects/infrastructure/htdocs/share/index.shtml .
  # scp -p root@tirpitz:/home/projects/infrastructure/htdocs/share/index.shtml .


== Restart Apache ==
=== Restart Apache ===
  # /etc/init.d/apache2 restart
  # /etc/init.d/apache2 restart

Latest revision as of 20:59, 18 July 2006

This article explains how to setup a new installation of Apache with our default Research branded index page. Our index page uses server side includes to get the hostname of the machine so this must be configured.

This configuration is written for SuSE and Gentoo, with Apache >=apache-2.0.53.

Enable Includes in Default VHost

SuSE

/etc/apache2/default-server.conf

<Directory "/srv/www/htdocs">
   Options Includes
   DirectoryIndex index.shtml index.html index.html.var
</Directory>

Gentoo

An unused setup should have DEFAULT_VHOST option set in: /etc/conf.d/apache2:

APACHE2_OPTS="-D DEFAULT_VHOST"

/etc/apache2/vhosts.d/00_default_vhost.conf Make sure 'Options' has 'Includes'

<Directory "/var/www/localhost/htdocs">
   Options Includes
   DirectoryIndex index.shtml index.html
</Directory>

AddType

In /etc/apache2/mod_mime-defaults.conf OR /etc/apache2/httpd.conf uncomment:

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Copy Default Research Webpage

Change to your root web directory, /var/www/localhost/htdocs or /srv/www/htdocs

# cd /var/www/localhost/htdocs
# scp -p root@tirpitz:/home/projects/infrastructure/htdocs/share/index.shtml .

Restart Apache

# /etc/init.d/apache2 restart