142e8
![]() |
|
|
|
|
|||||||
| Networking Network related discussions (including general TCP/IP stuff, routing, etc). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi everyone! I'm new here so go easy on me will yea
![]() I've been using ezjail's and so far everything's worked successfully. I've created the following jails with the following programs inside 'em: 10.0.0.1 - SSH 10.0.0.2 - mysql 10.0.0.3 - lighttpd 10.0.0.4 - php 10.0.0.5 - archives (all web sites will go here) (It's important to note each jail can access the internet) And now my question is how do I make some of the jails communicate with each other? Here is what I wanted: lighttpd -> access -> php lighttpd -> access -> archives (load websites) lighttpd -> access -> mysql etc etc I can't seem to find any tutorials that would help; moreover, I tried editing the /usr/local/etc/lighttpd.conf file under fastcgi module and I changed so it looks like: Code:
fastcgi.server = ( ".php" =>
( "10.0.0.4" =>
( "socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/local/bin/php-cgi-cgi"
)
)
Last edited by DutchDaemon; August 14th, 2009 at 11:17. Reason: tag fix |
|
#2
|
||||
|
||||
|
Please post the output of
# ifconfig from the host environment.
__________________
"Do Not Engage in Useless Activity" --Miyamoto Musashi |
|
#3
|
||||
|
||||
|
Install php in the jail that has lighttpd. It's rather pointless splitting these 2 up.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#4
|
|||
|
|||
|
If you want one jail to see a filesystem on another jail you could use mount_nullfs(8). At least that's what i'm doing.
Please reply if this might work for so i can give you the details howto mount_nullfs. Last edited by DutchDaemon; August 14th, 2009 at 11:19. Reason: [man] tag |
|
#5
|
|||
|
|||
|
Hi everyone and thanks for the help!
Believe it or not, I managed to figure out almost everything, first: I went into the phpjail and ran a code to load the a PHP-CGI server to host access to php through ip using this code: Code:
php-cgi -b 10.0.0.4:521 Then I went inside the wwwjail and I went to the /usr/local/etc/lighttpd.conf file and I went down to the module and I changed it to look like this: Code:
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"host" => "10.0.0.4",
"port" => "521"
#"socket" => "/var/run/lighttpd/php-fastcgi.socket",
#"bin-path" => "/usr/local/bin/php-cgi-cgi"
)
)
Lastley, lighttpd gave an error about not liking the jail, so went to the very bottom of the /usr/local/etc/lighttpd.conf fileand I commented out the IP4 & IP6 part: Code:
# Enable IPV6 and IPV4 together
#server.use-ipv6 = "enable"
#$SERVER["socket"] == "0.0.0.0:80" {}
So I guess I solved partially the the problem. My last question is how to make lighttpd access another jail with all the websites? ... would I have to use a ftp file server or something? Thanks all! (No need to show ifconfig, everythings working perfectly for the internet: I basically assigned every ip address from the firewall to the jail. So when I plan to get the web-server online, I'll make the firewall point and only point to the lighttpd jail ip �e) |
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
|||
|
|||
|
Hi Voltar!
Could you please give me an example with how to link the two directories using 'mount nullfs'. Thanks! |
|
#8
|
|||
|
|||
|
Quote:
# mount_nullfs /path/to/something /path/to/jail/somethingFor example if you wanted to mount the ports tree of the host in a jail, # mount_nullfs /usr/ports /path/to/jail/usr/portsYou can also mount in read only mode with # mount_nullfs -o ro which may be useful in your case if you only want your webserver to be able to read, but not write to the filesystem.
|
|
#9
|
|||
|
|||
|
Excellent! It all works perfectly!
I've managed to put ssh/lighttpd/mysql/website into different jails and it all works The problem has been solved.Thanks again Voltar, that did the trick nicely heh heh heeee. Last question if I may though. How do I unmount a 'mount_nullfs' ? Or how do I sever their link or stop it. Lets say I made two folders and now I want to delete them both, how do I do that? (thanks again!) |
|
#10
|
|||
|
|||
|
You can unmount a nullfs mount like every other mount. Just unmount the destination dir.
Last edited by DutchDaemon; August 17th, 2009 at 13:15. Reason: 'You' has not been not spelled 'u' since Prince went out of style |
|
#11
|
||||
|
||||
|
I wonder if there is an equivalent in Jails to Solaris Zone Doors?
|
![]() |
| Tags |
| jail, jails, lighttpd, mount_nullfs, multi jails, mysql, nullfs |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple jails on host... How to get each host network usage | gigikent2000 | Networking | 7 | August 14th, 2009 12:44 |
| One host, multiple sites. Help with SSL please! | gnr | Web & Network Services | 21 | June 2nd, 2009 08:58 |
| How to know if your jails are out of sync with the host system | ironmikie | Installing & Upgrading | 3 | May 12th, 2009 14:47 |
| Anyone using Mandatory Access Controls for Jails running services | osx-addict | General | 4 | April 4th, 2009 02:29 |
| Internet access from jails | rinalds | Networking | 5 | March 18th, 2009 13:48 |