Multisite with static fixed local IP

Events happening in the community are now at Drupal community events on www.drupal.org.
kabeza's picture

Hi

I've installed Drupal mainly for its multisite support. I must develop a project where I'll need to administer up to 40 sites using one drupal installation

For temporarily testing, I've configured an Ubuntu 11.10 server with lamp/webmin.

My problem is that every drupal multisite tutorial talks about apache virtualhosts with domains, but I can't use this stuff in this LAN (as far i know).

My PC and the server are behind a proxy, and both have static local IPs.

Drupal is located at http://10.x.x.150/drupal

How should I configure drupal, site.php, settings.php and the httpd.conf so I can have (for example)

http://10.x.x.150/site1
http://10.x.x.150/site2
...

Thanks a lot in advance,

Comments

There are different

Garrett Albright's picture

There are different approaches to this. My favorite is to edit my hosts file with domain names that end in .test that point back at my IP address - so, for example, for my site located at abweb.us, I access my local version of it at abweb.test. The site directory for the site uses the live domain name, so abweb.us instead of abweb.test, but I just create a symlink named abweb.test which points back to abweb.us, and all is well.

No symlinks required

skwashd's picture

If you use test (or localdev) as a subdomain of the live domain, such as test.example.com it will just work without needing any symlinks. You still need the hosts files entry.

Done

kabeza's picture

@Garret
I can't do the above because (as stated) the server is an Ubuntu, and it doesn't work with hosts file.

PS: Thanks God I could finally make it work

  • created folder with name 10.x.x.150.site1
  • copied and edited settings.php with the baseurl
  • copied and edited sites.php
  • created an alias in apache2 config as Alias /site1 "/var/www/drupal"

At least this worked. Don't know how about security, but that's another stuff for later

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: