ℹ️
Welcome to the archive of the old FlatPress support forum. Browse more than a decade of FlatPress wisdom! Login is disabled.

The current FlatPress support forum is available here: forum.flatpress.org
multiple instances with one codebase
  • i havent found anything belonging to serve multiple blogs from one flatpress instance so i will share my solution. I'm new to flatpress so if i've done anything wrong please tell me defaults.php // all writable directories go here. if ( preg_match('/^(\w+)\.myhostname\.tld$/i', $_SERVER['HTTP_HOST'], $matches) ) define('FP_CONTENT', 'fp-content/' . $matches[1] . '/'); else define('FP_CONTENT', 'fp-content/defaultOne'); I assume a Apache Virtual Host serving *.myhostname.tld
  • Hi, i'm trying to get this to work, but I'm not sure i understand... i've got apache doing vhosts serving, but I can't get flatpress to work with different fp-content/ directories... what should the directory structure look like under fp-content/ i've got a few vhosts defined in my httpd.conf file and each vhost has it's own directory at /var/www/htdocs/, , etc... would that interfere with this? thx, odd
  • ..never mind.. got it working. to answer my own questions. directory structure should look like this: e.g.: fp-content/www fp-content/library in each directory, there should be: fp-content//cache fp-content//config fp-content//content fp-content//index fp-content//users vhost definition should exist for (or , and where www and library resolve to the IP address(es) where apache is listening).
  • Posted By: yvesfi havent found anything belonging to serve multiple blogs from one flatpress instance

    This sounds interesting but could you explain a bit more about how you make use of this? Do you have an example site where this is implemented?
  • i'm hosting only 3 flatpress-blogs this way, 2 of them only for test reasons. I'm planning to host about 5 real blogs using this method. I changed it to use the sanitized hostname under fp-content/ so full domainnames are possible. A deploying of new blogs can be very simple if you test for existence of fp-content/$HOST and redirect to some "Main Blog" if not. Otherwise everyone can create any number of blogs (depends on directory permissions). My apache config looks like: ... ServerName mainBlogSite.org ServerAlias *.mainBlogSite.org *.otherBlogSite.com ... -> fp-content/testblog1.mainBlogSite.org/ -> fp-content/testblog2.otherBlogSite.com/
  • This discussion has been closed.
    All Discussions
    Start a New Discussion

    Howdy, Stranger!

    It looks like you're new here. If you want to get involved, click one of these buttons!

    In this Discussion