0

I'm thinking of changing my web server so that Apache (and all of django web apps) run inside of a jail rather then on my host machine. I want to make this change for two reasons, the first and primary reason is to learn more about jails and how they work. The secondary concern is security and sand boxing my current web server.

With that said, I was wondering what steps are required to move a working Apache instance on a host machine into a jail?

I have a zfs partition set up with a jails folder with a www jail. in the www jail I've installed apache and migrated all of my config files. How do I have to change my config files so that they'll listen to packets passed by the host machine and how do I set up my host machine so that it forwards those packets to my www jail?


UPDATE: So I've read the jails section of the handbook and I've set up a rc.conf and the jail. I guess what I'm really asking is do I need to change any of my apache configs? Can I use the same IP address for the jail as the host machine? If I can, may I just leave my apache configs unchanged?

1 Answer 1

2

FreeBSD comes with great handbook. Really must read, dude. For e. g., its chapter 16 describes Jails in depth.

UPDATE: Yes, you can use the same IP for Jail as non-jailed processes use, but of course, they can't bind the same IP:Ports, as it usually got used to be.

4
  • So I've read the jails section of the handbook and I've set up a rc.conf and the jail. I guess what I'm really asking is do I need to change any of my apache configs? Can I use the same IP address for the jail as the host machine? If I can, may I just leave my apache configs unchanged? Mar 27, 2013 at 9:47
  • @Rawrgulmuffins, Completely different questions now. Do you want them to be in your original question, don't you? I'd prefer. ;)
    – poige
    Mar 27, 2013 at 9:50
  • fair enough, I'm finding that although I'm a decent programmer I don't really know how systems work or even really how to ask questions yet. Thank you. Mar 27, 2013 at 9:54
  • So because my host isn't using port 80 I can use the same ip address (and the same apache configs) for my jail without conflicts. Thank you for the answer. Mar 27, 2013 at 11:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .