Wednesday, May 7, 2008

Apache

I will be showing you how to setup an apache web server. It is alot easier to setup an Apache server on a Fedora box then it is on FreeBSD. They both work fine once they are setup but I have to say I noticed FreeBSD is faster when using the same bandwidth. Apache on FreeBSD is very picky about the FQDN (fully qualified domain name) Which can be a pain in the ass. So first we change to the apache port directory
#cd /usr/ports/www/apache22
#make install clean
I enable MYSQL support encase later on I ever want to throw on a forum it will make life a lot easier.
When it's done compiling you can try to start to see the FQDN error
#httpd
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.2.107 for ServerName
[Wed May 07 09:34:15 2008] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
To get apache to work we have to edit the httpd.conf file
#nano /usr/local/etc/apache22/httpd.conf
Then you 'Where Is' Servername you change the example host.domain.com:80 to your domain or If you don't own a host name you will put in the computer IP address not the internet IP address to make it read like
ServerName 192.168.2.107:80
80 represents what port you want it to listen on http is normally 80 but you can make it whatever you want as long as it dosn't conflict with another program. For all of you who aren't programers take out the # at the begining of the line. # tells the script to skip over that line. So now you save the config file and run it.
#httpd
If you browse to your IP address you should get a webpage that says
"It works!"
Now you have an Apache server. The home directory for your html files is /usr/local/www/apache22/data Now you can start building your website, Goodluck!

No comments: