I'm new to drupal so please tell me If I'm leaving anything out. I'm installing a multisite drupal install on my local machine using WAMP server. I've got multisite working if i'm using a subdomain but i'm trying to get subdirectories working. What i've done so far.
After the 1st install of drupal I copied over the default folder in sites and renamed it to my second subdomain and edited the settings php db_url to my new database name. I also changed the base_url to drupal2/drupal where drupal is my first db name. The weird thing here is that my first drupal install is accessed by going to http://localhost/drupal where as the subdomain is accessed by going to http://drupal2/drupal. I'm not really concerned with that as this is mostly to test out the abilities of multisite before I go live. I also changed the hosts file and added these two new domains. Everything works fine.
Then I've tried to make a subdirectory at either http://localhost/drupal/drupal3 and at http://drupal/drupal3. I've already copied over the default folder and made the changes to the settings.php by changing the db_url to my new database and also renamed the folder drupal.drupal3. I changed the base_url to drupal/drupal3. I've tried to make a symlink by running a php script in the drupal root at www/drupal/sites. The script I used is
<?php
symlink(".", "drupal3");
print "Done";
?>My question is if I'm pointing everything in the right place. When I run the php script it tells my there is an error in the symlink() function. I also want to make sure if the base_url in the settings.php for my drupal3 site is in the right syntax.
I'm new to a lot of this and I've already poured through the forums and this group and have learned a lot. I hit the roadblock when trying to make the subdirectories work. I don't mind starting from scratch if I need to. If I have left out any relevant information Please let me know. Thanks
John
Comments
Why are you trying to make a
Why are you trying to make a symlink? The symlink() function may not work on Windows anyway… not sure.
Other than that, what exactly is going wrong? I don't quite understand what you're trying to achieve and where the failure is.
The Boise Drupal Guy!
I'm trying to get
I'm trying to get subdirectories working for a multisite install on my local machine. I am able to make a subdomain work such as mysite.example.com but what I want is to get example.com/mysite working. I'm using a windows machine and wampserver. The reason I'm using a local machine is to test everything before we go live.
I think the failure happens when i try changing the base_url line in the settings.php. I'm not exactly sure what the right syntax is for doing it on a local machine using wampserver.
I only tried doing the symlink because after reading many tutorials and forum posts I thought that's what needed to be doing for the subdirectories to work.
Thanks in advance for any help.
John
Generally speaking, you
Generally speaking, you should never need to change $base_url. Try commenting that line out.
After doing that and trying again, could you further explain what's failing? Do you see the normal example.com site in your browser when you try to go to example.com/mysite, or a 404 error, or…?
The Boise Drupal Guy!
I was always under the
I was always under the assumption that the base_url needed to be changed as well. At the moment when I try to go to example.com/mysite it goes to a page not found page for example.com.
I won't be by that machine for a couple of days but I'll make sure to try that out and respond with the results. Thanks a lot for the help.
Drupal multisite using the secure way
I done it successfully using this method by justin hileman at my Ubuntu 9.10. You can try out this method to setup Drupal multisite as acts as sub-directory ie example.com/site1 so on. No need to edit file hosts and sites-available/default . I am not sure either this method can be done on windows machine or not. Here is the website I refer to http://justinhileman.info/articles/a-more-secure-drupal-multisite-install.
Good luck