But after typingEnter the Jail and update and extract the portsnap, which we'll be using to install apache:
jexec 1 /bin/tcsh
portsnap fetch
portsnap extract
Now we can use ports to install apache:
cd /usr/ports/www/apache22
make install clean
After apache is installed, you can configure it by editing the /usr/local/etc/apache22/httpd.conf located within your Jail, where 192.168.1.61 is replaced by your Jail IP address:
#/usr/local/etc/apache22/httpd.conf
Listen 80
ServerName 192.168.1.61:80
We'll also add it to the /etc/rc.conf file so that it will automatically start on reboots:
echo 'apache22_enable="YES"' >> /etc/rc.conf
/usr/local/etc/rc.d/apache22 start
Code: Select all
portsnap extract


