# apache



## mlord (Feb 1, 2011)

Hi everybody
I'm new to FreeBSD, installed FreeBSD 8.1 on a VMware, then installed Apache22 through sysinstall. I'm trying to test the web server, but I don't know how? Here zre the configuration files:

/etc/rc.conf

```
apache22_enable="YES"
ifconfig_le0="DHCP"
defaulrouter="192.168.189.2"
hostname="test.com"
```

/etc/hosts

```
::1  localhost localhost.com
127.0.0.1 localhost localhost.com
192.168.198.3 test.com test
192.168.198.3 test.com test
```

/usr/local/etc/apache22/httpd.conf
Lines which I've changed

```
Listen 192.168.189.3:80
ServerAdmin [email]you@test.com[/email]
ServerName test.com:80
```

/boot/loader.conf

```
accf_http_load="YES"
```

any more configuration?


```
[root@test ~]:  apachectl configtest
Syntax OK
```

Thanks in advance for any help. If there is a step by step on installing Apache on FreeBSD?


----------



## SirDice (Feb 1, 2011)

Ok, first lesson. Forget sysinstall ever existed. Second lesson, read the handbook.

Handbook: Chapter 4 Installing Applications: Packages and Ports

Handbook: 29.7 Apache HTTP Server


----------



## AndyUKG (Feb 1, 2011)

Hi,

  yes, as mentioned you will want to install Apache in a good way, via ports. But to answer your original question, to test Apache you need to start the daemon which is normally done like:


```
/usr/local/etc/rc.d/apache22 start
```

Then see if you can connect via a browser to the IP of your server, or to check on the server side:


```
netstat -an | grep -i listen
```

and check if you have a daemon listening on port 80.

cheers Andy.


----------



## azz_kikr (Feb 1, 2011)

your host file says '192.168.198.3'

but the config file from apache22 says '192.168.189.3:80'


----------

