Project

General

Profile

Install Apache Web Server » History » Version 9

Amber Herold, 05/20/2010 03:30 PM

1 1 Amber Herold
h1. Install Apache Web Server
2
3
1. Install the Apache Web Server with the YaST or yum utility.
4
5
2. Find "httpd.conf".
6 8 Christopher Irving
 This is /etc/httpd/conf/httpd.conf on CentOS and /etc/apache2/httpd.conf on SuSE
7 1 Amber Herold
8
3. Edit the "httpd.conf" configuration file with the following:
9
 <pre>
10
 DirectoryIndex index.htm index.shtm index.html index.shtml index.php
11
12
 HostnameLookups On
13
 </pre>
14
15
*Note:* It may be possible to edit httpd.conf in YaST2 as well.
16
17 9 Amber Herold
4. If you plan to enable the web interface user login feature, the ServerName directive should be set to a resolvable host name and UseCanonicalnames should be turned on.  This will ensure the link provided in the email to verify user registration is valid. Follow the example below replacing YourServer.yourdomain.edu with your servers name.
18
19
  <pre>
20
     ServerName YourSever.yourdomain.edu  
21
     
22
     UseCanonicalName On
23
  </pre>
24
 
25
5. Restart the web server.
26 1 Amber Herold
27
<pre>
28
apachectl restart
29
     or
30 6 Neil Voss
sudo /sbin/service httpd restart     (ON CentOS/RHEL/Fedora)
31 1 Amber Herold
     or
32 8 Christopher Irving
/etc/sbin/rcapache2 restart   (ON SuSE)
33 1 Amber Herold
     or
34
/sbin/service httpd restart
35
</pre>                  
36
37
      If you want to start the web server automatically at boot on SuSE
38
39
<pre>
40 7 Neil Voss
sudo /sbin/chkconfig apache2 on  #SuSE
41
sudo /sbin/chkconfig httpd on  #CentOS/RHEL/Fedora
42 1 Amber Herold
</pre>
43 2 Amber Herold
44
______
45
 
46
[[Configure php.ini|< Configure php.ini]] | [[Check php information|Check php information >]]
47 3 Amber Herold
48
______