Configure Default Apache Index Page: Difference between revisions

From Research
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
>=apache-2.0.53
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.


== Add Includes Option for Default web Directory ==
This configuration is written for SuSE and Gentoo, with Apache >=apache-2.0.53.
/etc/apache2/default-server.conf OR /etc/apache2/httpd.conf OR gentoo=next section
 
== Enable Includes in Default VHost ==
 
'''SuSE'''


=== On Suse ===
/etc/apache2/default-server.conf
/etc/apache2/default-server.conf
<Directory "/srv/www/htdocs">
<Directory "/srv/www/htdocs">
     Options Includes
     Options Includes
     DirectoryIndex index.shtml index.html index.html.var
     DirectoryIndex index.shtml index.html index.html.var
</Directory>
</Directory>
 
'''Gentoo'''


=== On Gentoo ===
An unused setup should have DEFAULT_VHOST option set in: /etc/conf.d/apache2:
If /etc/conf.d/apache2 has DEFAULT_VHOST option set:
APACHE2_OPTS="-D DEFAULT_VHOST"
/etc/apache2/vhosts.d/00_default_vhost.conf
/etc/apache2/vhosts.d/00_default_vhost.conf
Make sure 'Options' has 'Includes'
Make sure 'Options' has 'Includes'
<Directory "/var/www/localhost/htdocs">
<Directory "/var/www/localhost/htdocs">
     Options Includes
     Options Includes
     DirectoryIndex index.shtml index.html
     DirectoryIndex index.shtml index.html
</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 ===
scp -p root@tirpitz:/home/projects/infrastructure/htdocs/share/index.shtml .
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 ==
=== 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