Access Multisite from another computer other them localhost

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

Hello drupal buddies, i have a simple question that i couldn't find the answer (maybe cause i cannot find the right keywords for search). I'm trying my first multisite installation of drupal, i created a folder tmp.mysite for my site in drupal_root/sites, and the installation completed without erros. Now on localhost i can access both the root site (with a url like http://localhost:port/drupal_root )
and the new site that i created in drupal_root/sites (with a url like http://tmp.mysite:port). I'm on Windows so to do this i put a line on the hosts file like this: 127.0.0.1 tmp.mysite, and added this piece of code to my apache configuration file

<VirtualHost localhost>
  ServerName localhost
  RewriteEngine On
  RewriteOptions Inherit
  RewriteCond %{REQUEST_URI} !/drupal_root.
  RewriteRule ^(/.
)?$ /drupal_root$1
</VirtualHost>

Now what i want is to be able to access my site in tmp.mysite from another computer, i can access the root site using http://drupalIP:port/drupal_root, where drupalIP is the ip of the machine where i installed drupal.

I now that is a silly question, but can someone help?
Thanks a lot.

Comments

It's pretty simple. It

Garrett Albright's picture

It's pretty simple. It sounds like you can already access the server computer from the other computer through the server's IP address, right? So on the other computer, simply edit the hosts file so that tmp.mysite points to that IP address. Just as you did with the server's host file, but using the external IP address instead of 127.0.0.1. Piece of cake, slice of pie and scoop of ice cream.

Thank you very much, but...

razevedo's picture

Thanks Garrett, works like a charm, but how can another person outside my network access this tmp.mysite folder without change any file? They can already access my drupal_root site using http://drupalIP:port/drupal_root, where drupalIP is the external IP of the machine where drupal is installed. How will the url look like? Thanks!

Well, you'll have to go out

Garrett Albright's picture

Well, you'll have to go out and register a domain name with a registrar and configure name servers so they point the domain name at your server's IP address - just like you do with a full production server. But that's probably overkill if you're just testing things and don't intend to use the server as a production server. Obviously, once affairs go outside of your network, you don't really have any control over them…

Ok now i think that i

razevedo's picture

Ok now i think that i understand, so if i want that other people outside my network have access to my test sites, without register a domain, i have to do multiple drupal installations so there will be various "drupal_roots" that will be accessed via http://drupalIP:anotherport/anotherdrupal_root. Thanks for the patience :)

Access my locahost pages from another machine?

Lamine's picture

I am absolutely new to this, rocky, and I have no idea what you guys were talking about on the previous posts.

So I'll need more, step-by-step, guidance on how to access my pages from other machines.

Where should I start.

Thanks Garrett

prhavile's picture

Thanks Garrett. I was facing the same issue to access my multisite drupal setup from another machine, This solution has worked. Thanks a lot.

Multisite

Group organizers

Group notifications

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