Nice module
skor - May 25, 2007 - 15:33
| Project: | Multisite Manager |
| Version: | 5.x-0.9 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I installed it and it created the DB properly on MySQL 4.1.20. Sorry, I don't have Postgres.
You're bound to get feature request about creating a sites/sitename/settings.php file. You might try to head that off up front by pointing out that it would be a major security hole.

#1
I was successfully install drupal with name portal.mydomain.com, then I create a site with name portal.mydomain .com/site/{shortname} using Multisite Manager. My problem is when I click on newly created site (portal.mydomain.com/site/{shortname}) the IE or Firefox return page not found. I follow actual steps shown in the INSTALL.txt inside multisite_manager folder. I think its a httpd.conf error:
VirtualHost *:80
AliasMatch ^/site/\w+/(.*) /var/www/html/drupal/$1
DocumentRoot /var/www/html/drupal/
/VirtualHost
I'm using Fedora Core 6.
Can anyone solve my problem....thank you.
#2
Is it an apache 'Page not found' 404 or a Drupal 404 'Page not found'?
If the latter, then you may not have your sites directory set up correctly. Do you have a directory in there with the name 'portal.mydomain.com.site' with the configuration described in the INSTALL.txt file?
If it's the former, then is your drupal install actually at /var/www/html ? That was in the INSTALL.txt, but is a placeholder for the root directory of your drupal install.
#3
Its a IE's page not found error.
Let me briefly highlight to you what was doing:
I have default drupal running with portal.mydomain.com address. I am intended to do multisite such as following:
1.portal.mydomain.com/site/it
2.portal.mydomain.com/site/hr
So, I installed the multisite module. Then I create folder portal.mydomain.com.site and configure the settings.php as shown in the INSTALL.txt file:
$requri = explode('/', request_uri());
if (sizeof($requri) >1 && $requri[1]=='site' && $requri[2] != '') {
$my_site_base = $requri[2];
#this will be the database shared between the main site and the shared sites
$db_url = 'mysql://root@localhost/drupal';
$db_prefix = $my_site_base."_";
$base_url = "http://portal.mydomain.com/site/$my_site_base";
}
Then I configure the httpd.conf:
VirtualHost *:80
AliasMatch ^/site/\w+/(.*) /var/www/html/drupal/$1
DocumentRoot /var/www/html/drupal/
VirtualHost
Then I go to drupal main site and create drupal site, the site and database was created but when I click on the link the IE or firefox return page not found.
#4
is your drupal code actually at /var/www/html/drupal ?
Also, if you've gone with the simpler configuration, make sure 'Clean URLs' aren't turned on in Drupal.
#5
My drupal installation is at /var/www/html/drupal ?
How to turn on and off 'Clean URLs'?
#6
My drupal installation is at /var/www/html/drupal ?
How to turn on and off 'Clean URLs'?
#7
Maybe you should include the relevant parts of your apache conf file, including what was working with your portal.mydomain.com drupal site before you made the changes. It was working before, right?
#8
The portal.mydomain.com is working. Following is my httpd.conf:
VirtualHost *:80
ServerName portal.mydomain.com
ServerAlias portal.*
DocumentRoot /var/www/html/drupal/
VirtualHost
But after modify above setting to multisite module's setting, the portal.mydomain.com is still working but the portal.mydomain.com/hr aren't working. Following is the multisite module's httpd.conf setting:
VirtualHost *:80
AliasMatch ^/site/\w+/(.*) /var/www/html/drupal/$1
DocumentRoot /var/www/html/drupal/
VirtualHost
#9
I manage to make it work. Its my httpd.conf error. But I cannot login, both main and subsite....why?
#10
try clearing your cookies. What did you change in your httpd.conf, for posterity?
#11
After clear the cookies the main site can login but the multi site cannot login.
httpd.conf:
DocumentRoot /var/www/html/drupal
AliasMatch ^/site/\w+/index.php /var/www/html/drupal/index.php
AliasMatch ^/site/\w+/(modules|misc|files|themes|sites)/(.*)$ /var/www/html/drupal/$1/$2
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^var/www/html/drupal(.*)$ index.php?q=$1 [L,QSA]
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/site/
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/var/www/html/drupal/site/(\w+)(/)?(.*)$ http://portal.remcorp.com/site/$1/index.php?q=$3 [L,QSA]
#12
I'm Sorry, some words automatically deleted. I have attached the proper one.
Please help me on login problem.
Thanks.
#13
If you clear your cookies again, and go to one of your /site/ 's can you login then? Also remember that the new site, won't have the same users setup, unless you've specifically shared the users table in your configure.php.
#14
Still cannot login...I have tried using shared and separate database, but the outcome is same.
#15
more data is better..... can you run a 'select * from {users} ' in your mysql db for the sub-site, and confirm that you have an account (and maybe set the 'pass' column for admin to the same password as your original site's admin pass-field value. At this point, I'm guessing login/password issues from the db side.
Also, you might just try for debugging purposes set the
$db_prefix = array(
'default'=> $my_site_base."_",
'users' => 'main_'
}
in your settings.php (that's what I meant when i incorrectly said 'configure.php' before), and see if that works.
#16
Still cannot login. I'm tired of trying....
#17
ok, this might be related to PHP sessionID, etc.--two drupals could override their own session data, perhaps, but the worst this would do should be to make session persistence unpredictable--but logging in at all doesn't seem to be in the scope of the module itself.
#18
While I am trying to configure my multi-site manager module, I have encounter the similar problem as muhsink describe on the first post. The different is i am using WINDOW XP while he is using Fedora.
I have follow the INSTALL.txt file that comes with the module; however, when create a new site, it throws a drupal page not found page. (See Attachment). My assumption is that there's a configuration error on my httpd.conf, here is my setting:
httpd.conf:
AliasMatch ^/site/\w+/(.*) "d:/wamp/www/drupal"
DocumentRoot "d:/wamp/www/drupal"
DocumentRoot "d:/wamp/www/drupal"
# If you figure it out, then go for it. Otherwise, what ain't broken...
AliasMatch ^/site/\w+/(\w+).php d:/wamp/www/drupal/$1.php
AliasMatch ^/site/\w+/(modules|misc|files|themes|sites)/(.*)$ d:/wamp/www/drupal/$1/$2
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^d:/wamp/www/drupal(.*)$ index.php?q=$1 [L,QSA]
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/site/
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/d:/wamp/www/drupal/site/(\w+)(/)?(.*)$ http://localhost/site/$1/index.php?q=$3 [L,QSA]
sites/default/settings.php
$requri = explode('/', request_uri());
if (sizeof($requri) >1 && $requri[1]=='site' && $requri[2] != '') {
$my_site_base = $requri[2];
#this will be the database shared between the main site and the shared sites
$db_url = 'mysql://username:password@localhost/drupal_test';
$db_prefix = $my_site_base."_";
$base_url = "http://localhost/site/$my_site_base";
}
htaccess:
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Also notices that the new site does create all the new database tables. Does anyone can point out where i did wrong on this configuration??? Many thanks.
#19
there's another way described in the most recent version of install.txt which can be done through .htaccess. you might try that too.
#20
Automatically closed -- issue fixed for two weeks with no activity.