I have an Apache server installed with Debian. Later, I partitioned my hard drive and installed Ubuntu on the new partition. Afterwards, I realized I could not access my Apache server while booted into Ubuntu.How can I make it so the Apache server is accessible over the Internet no matter which partition I am booted into?Or is that even possible?
Apache Server on different disk partitions
debian;ubuntu;partition;apache httpd
I cannot recommend sharing the apache server, unless you are really in a tight spot regarding disc space: the Debian and Ubuntu distribution would have to be very close for that to work (as Apache depends on each of the distros on other libraries).If you can install Apache on Ubuntu then it is very doable to share the content between the different implementations, and that could also be true if that content is dynamically generated e.g. with software like django or web2py.For the content to be shareable, you have to mount the Debian disc in Ubuntu. And then have the configuration of Apache on Ubuntu point to the Debian partition. This in general can be done by editing /etc/apache2/sites-enabled/000-default on the Ubuntu system and have the entries match those of the setup on Debian, except for all the paths, which should be prefixed with the location where the Debian partition is mounted on the Ubuntu systemIf this is not possible (because of hardcoded paths in the dynamic content software, you can try to make soft links from the Ubuntu directories to their equivalent on the Debian partition. In this case you have to make sure that Apache follows SymLinks, as I don't think it does that by default. This can be achieved e.g. if the Debian partition is mounted on /mnt/deb and the location of the content on Debian was on /srv/mysite by doing:cd /srvln -s //mnt/deb/srv/mysite .If you don't want to make the links, you can try to mount -o bind the Apache content directory on the Debian partition to the equivalent directory on your Ubuntu installation. This can be done, assuming the same configuration as with the example above by doing:cd srvmkdir mysitemount -o bind /mnt/deb/srv/mysite mysiteI have not done this between Ubuntu and Debian, but I have between versions of Ubuntu 8.04, 10.04 and 12.04 in the process of gradual upgrading with the possibility of switching back to the old software.