Putting FreePBX into a virtual host

I’m running FreePBX 13.0.163 on CentOS 7, and I’m trying to add Owncloud alongside it. Of course both want to run on Apache, on port 80. I’ve been reading guides on setting up virtual hosts, but I can’t get them to work.

-Currently, my FreePBX setup is located in /var/www/html but I created a test site in /var/www/html/freepbx to test the localtion of the new site

-I tried moving it to /var/www/html/freepbx then adding
IncludeOptional sites-enabled/*.conf to /etc/httpd/conf/httpd.conf

-I created a freepbx.conf file in /etc/httpd/sites-available/ and made a symlink to /etc/httpd/sites-enabled/

-Here’s the contents of freepbx.conf:

<VirtualHost *:81>
    ServerName freepbx
    DocumentRoot "/var/www/html/freepbx"

When I go to connect to nothing happens. But still goes to the FreePBX GUI.

It’s like Apache is disregarding the virtual host configuration files. Suggestions?

why in the world would you do that? load a hypervisor, and create two virtual machines, one for the pbx and one for your OwnCloud. my your life easy

Did you add “Listen 81” to Apache config?

No, I wasn’t aware of this. Where does it go and what does it do?

Because I already have the PBX up and running well.

all the more reason to not screw it up by piling on other programs. this is not a general purpose server. but it is your call i guess

I don’t disagree - upgrading to PHP 5.5 to run Owncloud has me a little uneasy as it is. Thanks for reassuring me in my concerns, might be best to explore other solutions.

if you want to do this on the cheap, assuming you have hardware that supports virtualization (any hardware built in the last 5 years will support virtualization), use Xencenter - it is similar to freepbx - free unless you want support. although you could create a vm from your running pbx, i would suggest to backup the pbx, install xen, create a vm, boot the vm with the freepbx iso that matches your backup and then restore your pbx. this is all good provided you are not using analog lines or PRI’s. you can then create a second vm, boot the linux flavor of your choice and load OwnCLoud on it. the obvious advantage is that you can update each vm independently of the other and if one takes a dump the other is unaffected.

1 Like

Might be able to do this even more easily with vSphere and the P2V tool actually. Good call.