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.