Open the terminal. Type:
su -
Hit enter. Type your root password. Hit enter. Type "ifconfig".
Hit enter. This will output the IP address of your machine (the numbers
after "inet addr:"). Type:
gedit /etc/hosts
Hit enter. In gedit edit your /etc/hosts file to include a line
containing your IP address, your domain name, and your short domain
name (the characters before the dot). Be sure to include a carriage
return after this line. When you are finished your hosts file should
look something like this:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
67.172.236.37 stantonfinley.org stantonfinley
Click on the "save" icon in gedit and exit gedit. Type:
gedit /etc/sysconfig/network
Hit enter. In gedit edit your /etc/sysconfig/network file and
replace "localhost.localdomain" with your domain name. When you are
finished your network file should look something like this:
NETWORKING=yes
HOSTNAME=stantonfinley.org
Click on the "save" icon in gedit and exit gedit. Type:
gedit /etc/httpd/conf/httpd.conf
Hit enter. In gedit scroll down to the "ServerAdmin" section and
enter your email address instead of "root". Scroll down to
the "#ServerName" section and uncomment it (take out the "#"). Then
enter the registered DNS name of your web site ("whatever.com") or your
server's IP address instead of "www.example.com". (If you don't know
your IP address type "ifconfig" at the root prompt.) Scroll down and
change "UseCanonicalName Off" to "UseCanonicalName On". Scroll down to
the "Options" line and change "Options Indexes FollowSymLinks" to
"Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI
MultiViews". Change "AllowOverride None" to "AllowOverride Options
FileInfo AuthConfig Limit" in case you want to use .htaccess files in
any of your web subdirectories. Change "DirectoryIndex index.html
index.html.var" to "DirectoryIndex index.html index.html.var
index.shtml index.cgi index.php index.phtml index.php3 index.htm
home.html welcome.html". Under the "AddType application/x-compress .Z"
and "AddType application/x-gzip .gz .tgz" lines add the line: "AddType
application/x-httpd-php .php .phps .php3 .phtml .html .htm .shtml
.fds". Uncomment the line "#AddHandler cgi-script .cgi" and add ".pl"
so that it reads "AddHandler cgi-script .cgi .pl". If you wish to
enable support to serve web pages from user's home directories as well
comment (add a "#" in front of) "UserDir disable" so that it reads
"#UserDir disable" and uncomment "#UserDir public_html" so that it
reads "UserDir public_html". Then uncomment and edit the control access
stanza for user directories below it so that it looks something like
this:
<Directory /home/*/public_html>
AllowOverride Options FileInfo AuthConfig Limit
Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Allow from all
</LimitExcept>
</Directory>
Click on the "save" icon in gedit to save your httpd.conf file
and exit gedit. Close the terminal.