Forum: Multiple Sites
| jwMIke 628 days ago | Hello,
I now have Awstats configured for multiple web sites. I have a batch file that creates the stats for each individual web site. This results in text files as such: 1.webDomain1/awst...46301.html 2.webDomain2/awst...46302.html 3.webDomain3/awst...46303.html I am also using Jawstats to pretty up the display pages. My question is, what do I need to do to enable each web site customer to view their respective Jawstats display? As always, Thanks in advance. |
| seb.compuccino.com 521 days ago | I have a patch for this coming out soon.. a rather simple config switch. Should be ready by the end of the week. |
| seb.compuccino.com 519 days ago | as promised
http://compuccino.com/labs/blog/2010/09/03/howto-awstats-und-jawstats-multi-user-konfiguration-inkl-patch Multi-User patch for jawstats. any questions, contact me at sebastian at compuccino d o t com |
| dmayo2 379 days ago | If you don't want to install a patch, I've done this with my config.php file.
"/var/lib/awstats/", "updatepath" => "/usr/lib/cgi-bin/", "siteurl" => "http://www.domain1.com", "sitename" => "domain1", "theme" => "default", "fadespeed" => 250, "password" => "my-1st-password", "includes" => "", "language" => "en-gb" ); elseif($_SERVER["SERVER_NAME"] == "www.domain2.com"): $aConfig["domain2.com"] = array( "statspath" => "/var/lib/awstats/", "updatepath" => "/usr/lib/cgi-bin/", "siteurl" => "http://www.domain2.com", "sitename" => "domain2", "theme" => "default", "fadespeed" => 250, "password" => "my-2nd-password", "includes" => "", "language" => "en-gb" ); endif; ?> |
| dmayo2 379 days ago | opps, looks like the entire config.php file got pasted in my previous post.
"/var/lib/awstats/", "updatepath" => "/usr/lib/cgi-bin/", "siteurl" => "http://www.domain1.com", "sitename" => "domain1", "theme" => "default", "fadespeed" => 250, "password" => "my-1st-password", "includes" => "", "language" => "en-gb" ); elseif($_SERVER["SERVER_NAME"] == "www.domain2.com"): $aConfig["domain2.com"] = array( "statspath" => "/var/lib/awstats/", "updatepath" => "/usr/lib/cgi-bin/", "siteurl" => "http://www.domain2.com", "sitename" => "domain2", "theme" => "default", "fadespeed" => 250, "password" => "my-2nd-password", "includes" => "", "language" => "en-gb" ); endif; ?> |
| dmayo2 379 days ago | Nope. Seems to be the bulletin board not posting the entire file contents.
Let's start with part1: start with the opening php tag, then: // core config parameters $sDefaultLanguage = "en-gb"; $sConfigDefaultView = "thismonth.all"; $bConfigChangeSites = false; $bConfigUpdateSites = false; $sUpdateSiteFilename = "xml_update.php"; |
| dmayo2 379 days ago | That seemed to work, now add in an if/else statement:
// individual site configuration if($_SERVER["SERVER_NAME"] == "www.domain1.com"): $aConfig["domain1.com"] = array( "statspath" => "/var/lib/awstats/", "updatepath" => "/usr/lib/cgi-bin/", "siteurl" => "http://www.domain1.com", "sitename" => "domain1", "theme" => "default", "fadespeed" => 250, "password" => "my-1st-password", "includes" => "", "language" => "en-gb" ); elseif($_SERVER["SERVER_NAME"] == "www.domain2.com"): $aConfig["domain2.com"] = array( "statspath" => "/var/lib/awstats/", "updatepath" => "/usr/lib/cgi-bin/", "siteurl" => "http://www.domain2.com", "sitename" => "domain2", "theme" => "default", "fadespeed" => 250, "password" => "my-2nd-password", "includes" => "", "language" => "en-gb" ); |
| dmayo2 379 days ago | and finally close up the config.php file with:
endif; ?> Works fine with me. No else statement needed. I run 8 different domains with one installation of jawstats this way. I have symlinks pointing to the one directory of live files. |
| mbsouth 374 days ago | @dmayo2
Hi, it´s also possible to do: $aConfig[ substr($_SERVER['SERVER_NAME'],4) ] = array( "statspath" => "./data/", "updatepath" => "/usr/lib/cgi-bin/", "siteurl" => "http://".$_SERVER['SERVER_NAME'], "sitename" => $_SERVER['SERVER_NAME'], "theme" => "default", "fadespeed" => 250, "password" => "yoursupersecretpassword", "includes" => "", "language" => "de-de" ); |
| mbsouth 374 days ago | @dmayo2
Sorry, forgott to change the statspath: "statspath" => "your/settings/here/", I use JAWStats with fcgid ans Suexec on Debian Squezze. The ./data (statistic/data) is in the users fcgid area. |
| asa 148 days ago | I use, instead of index.php, sitename.php and include on it a custom sitename-config.php.
That resolve the issue for me. |
Participate in this discussion
You must be logged in to post in this thread.
Version 0.7 beta available now
Released 25th Janury 2009Try the online demo or download now.
Latest JAWStats News:
Version 0.7 Beta Released
Sprechen Sie Deutsch? Multi-lingual JAWStats v0.7 is finally here.
posted 25th Jan '09. read more »
Help JAWStats
Please donate a dollar (or more!) towards the hosting costs for this site. This money doesn't go anywhere near my pocket, it is purely used against my hosting bill.
Get $50 off your webhosting
You could do far worse than choose Dreamhost. I've used them for 6 years and they're great. Simply enter the promo code: JAWSTATS on signup!