The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 01:30:31 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: virtual host subdomains on 192.168.x.x with bind9 ?  (Read 1963 times)
serialnoob
Journeyman
***
Offline Offline

Posts: 87


View Profile
« on: September 25, 2010, 08:17:43 PM »

The idea is to generate static html pages out of a local wordpress 3.0 multisite install with dummy sub domains. The pages would then be modified and rsync(ed) to outside servers.

Apparently, wp will only support "sub.real.com" and not "sub.dummy.lan"

Many forums suggest to use bind9 (with 192.168.1.10 in my case) in order to achieve this. After failing with most of the solutions I was wondering if anyone has the good one?

Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 9896



View Profile
« Reply #1 on: September 26, 2010, 12:31:51 PM »

I'm bait confused. So WP has feature that will let you drive pages out, but it requires that you drive them out to a real domain? If that's all, have you ever heard of the hosts file?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
serialnoob
Journeyman
***
Offline Offline

Posts: 87


View Profile
« Reply #2 on: September 26, 2010, 05:54:38 PM »

Well my plot is to use the multi-site feature of wp on a lan virtual host (192.168.1.10 in my case) to produce and maintain locally subdomain sites;

These would then get wget(ed) into "html only" websites and rsync(ed) to webservers after some manipulations: linking, ads, etc.

I am stuck at the wp level where the multi-site feature apparently requires the use of bind9 to make a 192.168.x.x type ip react like an "outside of the lan" one, the way I understood it,






Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 9896



View Profile
« Reply #3 on: September 26, 2010, 09:48:36 PM »

There's no real difference between an 'outside your lan' domain and a public one, except who handles name resolution.

WP would have no clue at all if you had something like....

192.168.1.25.    www.google.com

in your hosts file. Name solution looks to the local machine first, then DNS servers in order they appear in IP config. Now: if you're using machines where you don't have access to the hosts, then the next easiest way is simply put the dummy domains in your DNS records with your host so that they will resolve. If you have no ability to do either (I will not speculate on why you'd be making dummy sites for domains that you dont own...Wink ) then I suggest you create a sandbox at home where you DO have control of the hosts file, then push out from there.   
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
serialnoob
Journeyman
***
Offline Offline

Posts: 87


View Profile
« Reply #4 on: September 27, 2010, 09:18:28 AM »

I guess the issue is my misunderstanding of basic DNS concepts:

this is the WordPress Settings Requirements (from http://codex.wordpress.org/Create_A_Network)

"
    * Giving WordPress its own directory will not work in WordPress 3.0 with multisite enabled. It interferes with the member blog lookup.
    * You cannot create a network in the following cases:
          o "WordPress address (URL)" is different from "Site address (URL)".
          o "WordPress address (URL)" uses a port number other than ':80', ':443'.
    * You cannot choose Sub-domain Install in the following cases:
          o WordPress install is in a directory (not in document root).
          o "WordPress address (URL)" is localhost.
          o "WordPress address (URL)" is IP address such as 127.0.0.1.
"


my setup is the sandbox one presumably

I have the followings:

on 192.168.1.13 - desktop ubuntu lucid

on 192.168.1.10 - headless ubuntu karmic server
   this is where I'd like to set the "notreal.com" wordpress multisite.
   I'd like to create real-com0.notreal.com , real-com1.notreal.com, real-comX.notreal.com


I assumed creating a "notreal.com" virtual host would work but it does not, hence my attempt using the BIND9 solution


Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
serialnoob
Journeyman
***
Offline Offline

Posts: 87


View Profile
« Reply #5 on: September 27, 2010, 11:18:42 AM »

(sorry for the aggro re "this is becoming a wp tut")

Made some progress. Got the wp multi almost install running

for those facing the same issue the breakthrough was setting the virtual host to

<VirtualHost *:80>
ServerName wp1.com
ServerAlias *.wp1.com
DocumentRoot /var/www/wordpress
</VirtualHost>

in "/etc/apache2/sites-available/wp1.com", where wordpress is installed in "/var/www/wordpress",

then "sudo a2ensite wp1.com"
then "sudo /etc/init.d/apache2 restart"
then  follow the normal wp install as "http://wp1.com"


I can't figure out how to set up the followings (from the wp doc at the same address as above)

"
    In the DNS records on your server, add a wildcard subdomain that points to the main installation. It should look like:

      A *.example.com
"

Where is that file "DNS records on your server" ?
 

Logged

Success consists of going from failure to failure without loss of enthusiasm - Winston Churchill
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 9896



View Profile
« Reply #6 on: October 08, 2010, 09:50:03 AM »

That's wherever you are hosting your DNS resolved. Most don't host their own anymore, preferring to let either their registrar or host do it. So if you purchase from GoDaddy, you'd use their ultimate DNS control panel or WTF it is to point resolved domains at your server.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!