1
akito
question regarding two sites on one URL
  • 2005/9/4 18:41

  • akito

  • Just popping in

  • Posts: 7

  • Since: 2005/6/21


Ok, forgive me if this question is somewhat stupid, I might be thinking into it too much, but I just can't figure this out.

Ok, so I own http://www.uberakito.com, and I run XOOPS on there (i love xoops). My world of warcraft guild named Avant Garde needs a website, and I'm curious if/how I can go about putting our guild site at http://www.uberakito.com/avantgarde AND run a separate XOOPS installation on that as well.

Is what I'm wanting to do even possible? Would there be an easier way to accomplish what I'm trying?

Thanks so much for any assistance in advance, I really appreciate anyone taking the time to try and help me out. :)

Best Regards,
Akito

2
terrion
Re: question regarding two sites on one URL
  • 2005/9/4 18:50

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


With the Web Host I use I'm able to make many subdomains. I have a simple site at http://www.southeasttexaslinks.com that I use to install modules, play with them a bit, and generally learn Xoops.

I had your same need and created a sub-domain (which is just a subdirectory on your hosting account mapped to a unique URL) called funtrails.southeasttexaslinks.com to start working on another site I intend to develop.

The subdomain is simply a subdirectory off my web root (.../html/funtrails/) but is treated as if it is it's own web root when accessed like this: funtrails.southeasttexaslinks.com

Each site has it's own database and thus act completely independant of each other.

A great way to get the most bang out of your buck with a hosting account.

Hope this helps,
Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

3
akito
Re: question regarding two sites on one URL
  • 2005/9/4 19:10

  • akito

  • Just popping in

  • Posts: 7

  • Since: 2005/6/21


outstanding, I have a pretty good sized hosting account, and my personal site doesn't use nearly that bandwidth or file allowance, so I would be ok in that department, so you're saying just to create a subdomain? That's free I'm guessing?

Thanks so much for your advice. :)

edit: awesome, I just logged into my admin panel from my hosting company, and apparently I can create 50 subdomains.

Now for my final question, in light of doing this, I can just install XOOPS into that subdomain as I normally would anywhere and it wouldn't interfere with my personal site? I guess that's what I'm confused about, is how this is possible without it interfering with the main site.

4
terrion
Re: question regarding two sites on one URL
  • 2005/9/4 20:00

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


Good for you akito! I'm really glad this information has helped...

Quote:


Now for my final question, in light of doing this, I can just install XOOPS into that subdomain as I normally would anywhere and it wouldn't interfere with my personal site? I guess that's what I'm confused about, is how this is possible without it interfering with the main site.


Yes, you can install it twice. One full install into your primary web root, and another full install into the directory named after your subdomain name.

From an FTP perspective, if your domain name was domain.com the your webroot would probably be something like:

/home/akito/html

So if you created a sub-domain named something really creative like sub.domain.com, then your webroot for that domain name would be something like:
/home/akito/html/sub

And yes, as long as you dont get confused while FTP'ing up your site, they are two completely seperate XOOPS installations.

A close examination of the first few lines of mainfile.php in your primary account may shed some light on the situation.

Also, if you happen to be using a hosting account that uses CPanel with the Fantastico Installer, you can simply put the url sub.domain.com into your install directy field when installing using Fantastico.

And please, before trying all this stuff, back up everything. Go into phpMyadmin and back up your databases.

Let us know how it works out for you,
Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

5
adrock
Re: question regarding two sites on one URL
  • 2005/9/4 20:01

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


Create asnother database if you can as well.
If that is not possible, be sure to use a different 'prefix' for your database during the set-up...which by the way is also where you will put in the sub-domain as the URL of the new site.

Quote:

Now for my final question, in light of doing this, I can just install XOOPS into that subdomain as I normally would anywhere and it wouldn't interfere with my personal site? I guess that's what I'm confused about, is how this is possible without it interfering with the main site.


Ok... slow down a sec, and think about this;
Different files, in different directories, with different databses.

No...they will not interfere with each other!


Happy Xoopsing!
Affordable Web Hosting - Family - Fun!...and not always in that order!

6
EMSguy
Re: question regarding two sites on one URL
  • 2005/9/4 20:02

  • EMSguy

  • Just popping in

  • Posts: 86

  • Since: 2004/9/28


you can run XOOPS in any directory in your main site

i.e http://www.yoursite.com
or http://www.yoursite/funstuff(new XOOPS install in this directory)

etc...

all you need are two databases, there is a way to link XOOPS installs to one database I think but that is a bit complicated and I don't think you even want that since then the sites would interfere.

So when people type http://www.yoursite.com (main XOOPS install)they will get your main install if its in the root directory and if they type type http://www.yoursite.com/(name of folder here, as long as it isn't one that XOOPS uses) i.e http://www.uberakito.com/avantgarde will work fine

The only problem is that your users will have to type http://www.uberakito.com/avantgarde in the browser address bar to get to that XOOPS install.

The subdomain would probably be cleaner in feel. and remember

1.)xoops install------1st database
2.)2nd XOOPS install -2nd database

Kev
"why don't you put her in charge!" aliens
Yes, I have a cool and crunchy exterior and a creamy geeky filling.

7
akito
Re: question regarding two sites on one URL
  • 2005/9/4 20:33

  • akito

  • Just popping in

  • Posts: 7

  • Since: 2005/6/21


absolutely wonderful. Thanks so much guys, I can't thank you enough for the information and for being patient and friendly with me during my course of learning about all this.

I'm glad to know I can count on the XOOPS community when I have a question. :)

8
jensclas
Re: question regarding two sites on one URL

Ok ...time for some help for me!!!

Yes...there is Cpanel. The XOOPS 2.0.14 installation created the database _xoop1 for my subdomain test.jensclassroom.com and everything else seems to be ok in mainfile.php but I consitently get an error loading th page in firefox so as yet I have not been able do anything. Now since all the data is in mainfile.php should i assume the install has executed and the install folder can be deleted?

Would someone mind checking this mainfile.php and tell me if it is correct? (all bar the password and some details of course!) My host has not responded to the fact that their claimed now installed and ready to use is not working! Is there a problem with the table prefix being 'xoops' while the datase name is xoops1?? That's about the only think this non coder can think of!

I really want fix this so I can help other Cpanel users with the same/similar problem.


Quote:
if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
define("XOOPS_MAINFILE_INCLUDED",1);

// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_ROOT_PATH', '');
define('XOOPS_ROOT_PATH', '/home/jensclas/public_html/test');

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', '');
define('XOOPS_URL', 'http://test.jensclassroom.com');

define('XOOPS_CHECK_PATH', 1);
// Protect against external scripts execution if safe mode is not enabled
if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) {
if ( function_exists('debug_backtrace') ) {
$xoopsScriptPath = debug_backtrace();
if ( !count($xoopsScriptPath) ) {
die("XOOPS path check: this file cannot be requested directly");
}
$xoopsScriptPath = $xoopsScriptPath[0]['file'];
} else {
$xoopsScriptPath = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME'];
}
if ( DIRECTORY_SEPARATOR != '/' ) {
// IIS6 may double the \ chars
$xoopsScriptPath = str_replace( strpos( $xoopsScriptPath, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsScriptPath);
}
if ( strcasecmp( substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace( DIRECTORY_SEPARATOR, '/', XOOPS_ROOT_PATH)) ) {
exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
}
}

// Database
// Choose the database to be used
define('XOOPS_DB_TYPE', 'mysql');

// Table Prefix
// This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'xoops'.
define('XOOPS_DB_PREFIX', 'xoops');

// Database Hostname
// Hostname of the database server. If you are unsure, 'localhost' works in most cases.
define('XOOPS_DB_HOST', 'localhost');

// Database Username
// Your database user account on the host
define('XOOPS_DB_USER', 'my username_xoop1');

// Database Password
// Password for your database user account
define('XOOPS_DB_PASS', 'my password');

// Database Name
// The name of database on the host. The installer will attempt to create the database if not exist
define('XOOPS_DB_NAME', 'jensclas_xoop1');

// Use persistent connection? (Yes=1 No=0)
// Default is 'Yes'. Choose 'Yes' if you are unsure.
define('XOOPS_DB_PCONNECT', 0);

define('XOOPS_GROUP_ADMIN', '1');
define('XOOPS_GROUP_USERS', '2');
define('XOOPS_GROUP_ANONYMOUS', '3');

foreach ( array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global ) {
if ( isset( $_REQUEST[$bad_global] ) ) {
header( 'Location: '.XOOPS_URL.'/' );
exit();
}
}

if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '') {
include XOOPS_ROOT_PATH."/include/common.php";
}
}
?>


Mods - please edit anything i didn't edit that i should have from the mainfile above...I knew to hid username and password (learned that one when i was a real noob!)

Now of course I can take the ftp road and do a manual install but I'd really like to see if this will work...and then try the same with 2.0.15
The sub domain is called 'test' for a reason


TIA

EDIT - I'll be b...ggered...it is working! Don;t know why or how but all i have done is open the mainfile.php to copy it here...????

Login

Who's Online

307 user(s) are online (183 user(s) are browsing Support Forums)


Members: 0


Guests: 307


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits