# Apache 2 enable site



## adripillo (Jul 10, 2013)

Now trying to enable _a_ site with apache2. This guide says to use the command `a2ensite` but I google it and can not find the correct one. Can someone help me please*?.*?


----------



## ShelLuser (Jul 10, 2013)

adripillo said:
			
		

> Now, trying to enable site with apache2.


I don't know what guide that would be, but a2ensite is not a native Apache utility:


```
smtp2:/home/peter $ pkg_info -Lx apache22 | grep a2ensite
smtp2:/home/peter $
```
When checking the online manualpage for a2ensite it becomes obvious that this is a native Linux utility (originating from Debian I think) which merely creates symlinks to enable configured sites to be used.

But when using FreeBSD you shouldn't rely on Linux-related guides, just because of issues like these. In many cases the way to configure software in Linux hardly resembles the way it was thought up by the original author.

So; to set up a website in Apache simply follow the Apache documentation instead. Either that or check out /usr/local/share/doc/apache22 on your system.

In short; you need to edit /usr/local/etc/apache22/httpd.conf.

The quickest way to set up virtual hosts ("extra websites") would be to enable this line:


```
# Virtual hosts
#Include etc/apache22/extra/httpd-vhosts.conf
```
Then continue to edit httpd-vhosts.conf to add your website. Either copy or change the included examples and you should be well on your way.


----------



## adripillo (Jul 10, 2013)

Yes I am following a guide from Linux but I am doing it on FreeBSD because I do not like Linux and I already enabled and added the


```
# Virtual hosts
#Include etc/apache22/extra/httpd-vhosts.conf
```

So, let*'*s see if all this works fine. I will let you all know. Thanks.


----------



## wblock@ (Jul 10, 2013)

adripillo said:
			
		

> Yes I am following a guide from Linux but I am doing it on FreeBSD because I do not like Linux and I already enabled and added the
> 
> 
> ```
> ...



That is not enabled.


----------



## adripillo (Jul 10, 2013)

wblock@ said:
			
		

> That is not enabled.



What I wanted to say is that _I_ removed the "#" from _the_ Include line.


----------



## wblock@ (Jul 10, 2013)

That would be enabled, yes.


----------

