Apache 2 enable site

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?.?
 
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:

Code:
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:

Code:
# 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.
 
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

Code:
# 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.
 
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

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

That is not enabled.
 
Back
Top