Well,
After playing with sweetcron for a bit I wanted to have 4 sites use it but I didn’t want to have to update each site everytime I need to update sweetcron. I found a little tweak you can do to get sweetcron working on multple domains with one install.
First, create the folder and put the files in there from the sweetcron download.
Next, point a domain to that folder ( i am assuming you already know how to create domains and already know how to point your domains to a folder on your server)
Next, point the second domain to that same folder. (at this point you will notice both domains are identical and use the same sweetcron.)
Now we are ready to get each site using its own sweetcron.
First, open /system/applications/config/config.php
you will want to change
“$config['base_url'] = “http://www.your-site.com/”;”
to
“$url = $_SERVER['SERVER_NAME'];
$config['base_url'] = ‘http://’.$url.’/';”
This will keep the scope correct for which domain you com in from.
Second, open /system/applications/config/database.php
now since we are using multiple domains we will want to create a switch so we can pull the correct data for each domain. I could not get the database prefix to work for me on this setup and I didn’t bother to look into it since I just used different databases for each site. So I created a switch off of the given domain and set the appropriate database to use.
Now you are able to have multiple sites point to one install of sweetcron.
** NOTE **
I had one issue with install on this. I could not get the database prefix to work correctly with sweetcron. I’m not sure why but i didn’t spend anytime looking into it either. It was just as easy for me to use different databases for each domain. In theory you could do the same switch on the database prefix instead of the database name.
SweetCron Reviews and Resources Roundup | Lifestream BlogOctober 6th, 2012 at 4:19 pm
[...] Using one install for multiple domains [...]