Hi all,
I'm new in this drupal community, I look for a very powerfull CMS and the result of my research is : Drupal ;)
I have problem to create drupal multisite, I already look in documentation / forum / setting.php comments.
I work in localhost with wamp : PHP5, apache2, mysql5
I would like to create 3 site with my drupal installation :
To do that I unzipped drupal 5 in : d:\Taf\mycompany\mysite\www\
and after I created 3 folders like that :
- /sites/mysite.com
- /sites/domain.monsite.com
- /sites/domain.monsite.com.fr
in these forders, i copy the setting.php from the default folder and paste it (I didnt launch the installation of drupal), because the default installation is for default forlder, and I want to launch it for mysite.com folder.
After the creation of these folders, I made an alias in my web server : if I type : http://localhost/mysite/ it comes to d:\Taf\mycompany\mysite\www\, so, if I type this url I go to the installation process of drupal (but for default folder).
Now I want to launch the installation of drupal for mysite.com, what should I do that ?
- I tried things like : http://localhost/mysite/sites/mysite.com, but it dont works
- I tried to modify C:\WINDOWS\system32\drivers\etc\hosts and put :
127.0.0.1 localhost
127.0.0.1 mysite.com
127.0.0.1 www.mysite.com
127.0.0.1 domain.mysite.com
127.0.0.1 www.domain.mysite.com
Then I tried to create virtual host in httpd.conf :
DocumentRoot /mysite/sites/monsite.com
ServerName monsite.com
ErrorLog logs/monsite.com-error_log
CustomLog logs/monsite.com-access_log common
After that I restard all web services and tried :
- http://www.mysite.com/ and http://mysite.com/
- http://mysite.com/sites/mysite.com/
Nothing works, I cannot go to the installation page of drupal for mysite.com. I can only go to default installation by taping http://localhost/mysite/
Please help !!
Thanks
Comments
Your virtualhosts need to point to same directory
all your virtualhosts need to point to the drupal directory:
d:\Taf\mycompany\mysite\www\
In my setup I use the apache NamedVirtualHost directive in the http.conf file as follows:
Now you also need to edit the settings.php for each site as described in the installation instructions. Drupal will then serve up the different sites using the one drupal install.
After you have the apache directives working you need to go look at the multisite documentation in detail: http://drupal.org/node/43816
Ok, I think I
Ok, I think I understood...
And If I want one database by website, after the installation, I go to phpmyadmin and export it. and import it on another database name ?
And in setting.php of the second website, i put the new name of the database ?
That's that ?
Drupal 5.0 RC1
on Wampserver A.6.5 (PHP 5.1.6, Apache 2.0.59, MySQL 5.0.24a, PHPMyAdmin 2.8.2.4)
Be careful
You shouldn't use phpmyadmin to export & import the database into separate sites in the way you describe.
What I think you want is one database per website. In this case do something like the following:
1. Create one database for each website. e.g. exampleDB, mysiteDB, yoursiteDB
2. Note the username and password that you will use for each DB.
3. Go to www.example.com - You will be presented with the "Database Configuration" page. Here put in the DB name, username, password and base URL as requested.
4. Next go to www.example2.com and do the same again. This time use the DB and other details for this site.
5. Keep doing this until all your sites are configured.
NOTE: you should use drupal v5.0, not 5.0 RC1.
ok, I success for 2 website but the third is problematic
I successfully configures the 2 sites below :
To do that I configure :
httpd.conf
setting.php of monsite.com
setting.php of mondomaine.monsite.com
But for the third site, it doesn't work :
httpd.conf
setting.php of mondomaine.monsite.com.fr
Do I miss something ?
Thanks
Drupal 5 en local sur WAMP5 1.6.5
PHP 5.1.6 / Apache 2.0.59 / MySQL 5.0.24a /phpmyadmin 2.8.2.4
can't help you much
Here's what I do know:
Firstly, the apache configuration is going to redirect the domain http://mondomaine.monsite.com/ to D:/Taf/monsite/www/ because of your second virtualhost directive. So you should not try to add another redirect for http://mondomaine.monsite.com/fr
Secondly, $base_URL for the third site should be http://mondomaine.monsite.com/fr
BUT
I don't know if it is possible to serve one drupal site out of www.example.com and a different site out of www.example.com/fr I have never tried this configuration. Perhaps the documentation has some details, or maybe somebody else can help?
I have only implemented situations with different sites as follows:
www.example.com
other1.example.com
www.example3.com