Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: michalis1984 on September 24, 2012, 22:18:24

Title: multi-sites
Post by: michalis1984 on September 24, 2012, 22:18:24
I enable multisites and create another one site. Lets say localhost/site2 and i choose to be enable .. When i visit the site at this url it says the site is offline.

Also, its not clear to me how i will manage this second site. (add articles, select template etc)
Title: Re: multi-sites
Post by: michalis1984 on September 26, 2012, 11:02:23
Is anyone able to control the content of a second wwebsite guys?  :D
Title: Re: multi-sites
Post by: datahell on September 26, 2012, 11:21:02
In order for the subsite to work you must edit the htaccess file based on the recommendations.

After that you access the sub-site like that

frontend:
http://www.example.com/mysub/
Backend:
http://www.example.com/mysub/estia/

Where "http://www.example.com" the main site, "mysub" the url indentifier for the sub site.
If you have renamed the administration folder change "estia" to what ever name you have set.

Important note: On sub-sites you are not allowed to install extensions, you can only synchronize extensions. If you need an extension, lets say the download plugin, on the subsite and it is not installed the admin of the main site must install it and then the admin of the sub site should synchronize the extension to make it available on the sub-site too.
Title: Re: multi-sites
Post by: michalis1984 on September 26, 2012, 11:39:10
Great.

It's straight forward and it works fine. Thank you.
Title: Re: multi-sites
Post by: datahell on September 26, 2012, 13:05:03
I am glad michalis that you succeed!
Title: Re: multi-sites
Post by: michalis1984 on September 26, 2012, 13:22:43
Is there anything else i have to do in order to work property, except of the .htaccess modify? Maybe create "site2" folder? Put any required files inside?

Because locally works fine. But online when i try to visit www.daskalemata.com/glwsses/estia i got redirected back to www.daskalemata.com/estia so i am not able to login. I turned the site online by editing the config2.php file the value $ONLINE


Also i tried to setup the domain throught the cpanel so www.glwsses.gr points to www.daskalemata.com/glwsses but when i visit www.glwsses.gr i got 500 error
Title: Re: multi-sites
Post by: datahell on September 26, 2012, 14:21:21
No, don't create a folder! Also dont set up re-directions from cpanel, it wont work.
The sub-sites are virtual.
You only need to modify the .htaccess file, nothing else.
Elxis will do the routing and everything will work fine.
Title: Re: multi-sites
Post by: michalis1984 on September 26, 2012, 14:32:40
I have online a folder /glwsses so that causes the redirection problem. I delete this folder and now is ok  ;D

So if i dont use cpanel redirection. Isnt there any way to gave glwsses.gr works as separete website with the same installation?

i dont want daskalemata.com/glwsses to be the visible domain but glwsses.gr

Isnt possible for each different elxis virtual website have its own domain?

for example

daskalemata.com/glwsses   ---> glwsses.gr
daskalemata.com/site3  ---> othersite.gr
...


 

Title: Re: multi-sites
Post by: michalis1984 on September 26, 2012, 14:58:19
I use this code at .htaccess

Code: [Select]
RewriteCond %{HTTP_HOST} ^glwsses.daskalemata.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.glwsses.daskalemata.com$
RewriteRule ^(.*)$ http://www.glwsses.gr/$1 [R=301,L]


It looks to work. Is this the propper way?
Title: Re: multi-sites
Post by: michalis1984 on September 26, 2012, 19:15:29
After some time i realise that this is not what i am looking for  ???
Title: Re: multi-sites
Post by: datahell on September 26, 2012, 19:43:34
What you do with redirections, addon domains, etc, is something yours...
Elxis displays sub-sites the way I already wrote.
Title: Re: multi-sites
Post by: michalis1984 on September 27, 2012, 18:21:22
Now i have the main site at www.daskalemata.com and the sub-site as www.glwsses.gr/glwsses  .. if i access glwsses.gr i will see daskalemata.com

What i did was. I add the second domain to my cpanel pointing to /public_html folder , so sub-domain root is the same as main domain.

Then from the elxis configuration i set the url for the sub site as www.glwsses.gr/glwsses (where basically the glwsses is the subfolder). The links at the second site works nice but i cant get rid of the /glwsses folder at the urls

Title: Re: multi-sites
Post by: datahell on September 27, 2012, 20:13:58
Please don't confuse the other users with your setup, it is outside the scope of Elxis sub-sites.
You wont get rid of the sub-site URL identifier without modifying elxis as sub-sites built based on a specific idea (sub-sites should be on the same domain and appear as sub-folders. You can rewrite a folder to a sub-domain but with the first click you will get again a sub-folder in the URL).
If you want sub-sites in different domains do multiple Elxis installations, don't use sub-sites in this case!
Title: Re: multi-sites
Post by: michalis1984 on September 27, 2012, 20:25:51
Thank you for claryfing this. I was confused because wp offer multible domains with the same installation. I throught the idea was the same, to have different domains with only one installation. Now is all clear. Thank you because the last 3 days i try to find a solution.  Finally i got it  ;D
Title: Re: multi-sites
Post by: michalis1984 on September 27, 2012, 20:30:40
But now as you set it.. i think is importance to be able to install elxis in a sub folder.. and not only at root folder. Because if it can be installed only at root, this means we will need one hosting for each domain/elxis installation
Title: Re: multi-sites
Post by: datahell on September 27, 2012, 21:57:19
I never said that.
I recommend installing Elxis in the web site root but you can install it in a folder if you like (in this case prefer a sub-domain).
The latest release (rev1302) fixes the installer's problem with sub-folders, so you can install elxis in a sub-folder.

Elxis 4.x has been built as a platform for small, medium and large scale sites.
We have focus a lot on performance issues in order to run good under high pressure on large scale sites.
But finally, it is the web master the one who makes Elxis work good or not.
We are not responsible for bad setups, settings, slow or overloaded servers, etc...
You should not, for example, try to built a site like yahoo.com in a shared hosting environment. You are an idiot if you do it.
It is up to you how you will use it, it depends on your skills, wisdom and knowledge.
Title: Re: multi-sites
Post by: michalis1984 on September 27, 2012, 22:09:17
I build small scale websites on shared envirorments, so this was an importance issue for me. I am going to download the new revision since this issue is solved. I use elxis since 2006 because its the best platform. Cheeres to everyone. Keep up the good work.
Title: Re: multi-sites
Post by: Tank on September 28, 2012, 18:40:17
But now as you set it.. i think is importance to be able to install elxis in a sub folder.. and not only at root folder. Because if it can be installed only at root, this means we will need one hosting for each domain/elxis installation

Not really.
If you have example.com, you can always create site2.example.com direct it to example.com/site2 and it will install fine. No need to have one hosting for each install.
Since subdomains are offered for free by host companies.

But, since datahell have fixed the subfolder issue, my answer is quite pointless.  ;D
Just my 2cents.

I agree much with datahell, it is up to webmaster to make great of the CMS.
"A sword is only as great as the swordsman" ... or something like that. Haha. Cheers!
Title: Re: multi-sites
Post by: michalis1984 on September 28, 2012, 19:57:55
Guys i think there i a missunderstood here  :-\ myabe because of my bad english.

I host my sites at shared hosting. My main domain is in /public_html. When i add a new domain at cpanel a folder is created, having the domain name lets say /public_html/domain2 and this is the main folder for this domain. - Nothing new. This is how shared hosting works.

When i tried to install the first revisions anywhere else except in /public_html (for example /public_html/domain2) there was a problem. So i was not able to use the first versions at /public_html/domain2 which ofcourse is a top level domain.

With the last revision, this problem is solved. Of course im not interested to install elxis at subfolders. I shown so much interest about this issue because i was able to install elxis only at my main domain and not to the extra domains which i have at this shared server.

That was the reason why i missunderstood the how subsites works. Because i throught we should install it only at /public_html. Big confusion. Forget it if you don't understand me  ;D
Title: Re: multi-sites
Post by: xenios on October 24, 2012, 23:29:16
Multisites doesn't seem to work good on my server.. It is a clean install of nautilus with mysql db, it is installed under /public_html/test folder. The main site works perfect, but my testing multisites seems offline either in "test/estia" an either if i force online through config2.php, it works without images and the admin page calls an "error 404" and "code: E404-CCON-0005"

 ???
Title: Re: multi-sites
Post by: webgift on October 25, 2012, 10:27:11
Have you enable some rules at the .htaccess file, a_xenias? If yes, can you please mention us what do you mean by telling 'offline'?
Title: Re: multi-sites
Post by: xenios on October 25, 2012, 12:39:41
Hi, i don't have change anything in .htaccess except the rewrite rules that i had copy & paste after the creation of the second site. I took the code that appeared as it was and pasted it into the bottom of the .htaccess file.

After the creation of the second site through multi-site panel the link opens with the message that the site is off-line. The same thing appears if i try to put /estia at the end of my link to access administration.

I forced on-line mode through config4.php file but then i have fatal error at administration page and nothing works at front-page.

Nothing seems to change in main site that works normally in the front-page and in administration.

I will describe from scratch my installation:

"xxx" is the word that will be replace real names so i do not have to expose my work.

1)Root: /public_html/   http://www.xxx.gr  this comes with Elxis Aphrodite.

2)subdomain of root that i tried at first: /public_html/xxx.xxx.gr     http://xxx.xxx.gr (i had the same problems in multisites)
 
3)Main site that works:  /public_html/xxx/  http://www.xxx.gr  (this is a second domain (not subdomain) in the same ip and there is an installation of elxis nautilus with .htaccess works perfect there!)

4)Multisite with problem  /public_html/xxx/xxx  http://www.xxx.gr/xxx  (this is coming after the creation of a second site through multi-site panel. Here it comes the problem)


I also include screenshots and attachments that will help more than my description.   Download the .rar file from http://www.xenias.gr/temp/elxis1.rar (http://www.xenias.gr/temp/elxis1.rar) .
Title: Re: multi-sites
Post by: datahell on October 25, 2012, 13:10:29
As you have the site in a sub-folder you have to place one more path (the sub-folder) in htaccess in front of the relative paths and set properly the re-write base.

Once more: we do not recommend placing Elxis inside sub-folders.

Example for sites in sub-folders:
RewriteRule ^/folder/mysub/estia/inner.php folder/estia/inner.php [L]
Title: Re: multi-sites
Post by: xenios on October 25, 2012, 14:14:12
I never said that.
I recommend installing Elxis in the web site root but you can install it in a folder if you like (in this case prefer a sub-domain).
The latest release (rev1302) fixes the installer's problem with sub-folders, so you can install elxis in a sub-folder.

Elxis 4.x has been built as a platform for small, medium and large scale sites.
We have focus a lot on performance issues in order to run good under high pressure on large scale sites.
But finally, it is the web master the one who makes Elxis work good or not.
We are not responsible for bad setups, settings, slow or overloaded servers, etc...
You should not, for example, try to built a site like yahoo.com in a shared hosting environment. You are an idiot if you do it.
It is up to you how you will use it, it depends on your skills, wisdom and knowledge.

From your reply i understood that there is no problem if install elxis to subdomain.
Why it is not recommended to use elxis in a subfolder? I didn't use subfolders but subdomain and a main domain.  What problems should i expect if the installation is not in root?
Title: Re: multi-sites
Post by: datahell on October 25, 2012, 19:28:03
htaccess is like onion layers. If you have an other cms with htaccess in the root folder and elxis in a sub-folder with an other htaccess they may be overlapped. Most people don't know how htaccess work, even "professionals" don't know such basic things... Also the filesystem of the one cms is internal to the other. It is also not good from a design and seo point of view. You must be careful and most people isn't...

Even Elxis 4.x multi-sites, although there is no need of second elxis installation, is a featured addressed only to advanced users. We don't recommend you enabling multi-sites unless you fully understand how they work.
Title: Re: multi-sites
Post by: xenios on October 26, 2012, 00:19:50
Ok, thanks. I think this answer goes for everyone that is not professional or specialists, so why don't you promote a professional version of Elxis and another one for newbies? It will save you much time from answering in people that is not "pro".
Title: Languages in multi-sites
Post by: hakangur on October 26, 2012, 10:56:11
As far as the interface is concerned, I would like to have two active languages for the main site but only one language for a sub-site. Yet, I see that this is not possible; I cannot "switch on/off" installed languages. Would it not be a good idea to have an option to "disable" one or more languages for the main site or the sub-site(s)?
Title: Later better than never!
Post by: hakangur on October 26, 2012, 12:24:47
After I posted my message about disabling certain languages, I realized that this option is possible through the mod_language module. Therefore, please disregard the previous message.
Title: Re: multi-sites
Post by: datahell on October 26, 2012, 14:19:17
 :D
Title: Michalis, I need your help
Post by: juanon on August 10, 2013, 19:37:35
Hi,

Did you find a hack to solve this? I would also like multisite for different domains.

Regards
Title: Re: multi-sites
Post by: michalis1984 on August 11, 2013, 13:54:40
Since Datahell explain the way multi-sites work i stop trying to make it work for different domains. I make separate-clean installation for each domain.

Greetings
Title: Re: multi-sites
Post by: juanon on August 11, 2013, 16:00:04
Thanks, my firend.

I think it can be easyly fixed with some htaccess rules, but I have had no luck till now.

Someone know how to get this?

Thanks!!

Title: Re: multi-sites
Post by: webgift on August 12, 2013, 14:11:04
if your domain name registar could give you the option of redirecting your domain visitors to any URL or website of your choice it would be great to use it without the need of buying new web hosting plans.
F.e.:
mywebsite.com -> myroot.com/sub
mywebsite1.com -> myroot.com/sub1

Of course on such a case, there is no need to use .htaccess rules for the domain names mywebsite.com and mywebsite1.com. You should only modify the .htaccess of the domain myroot.com.
Title: Re: multi-sites
Post by: juanon on August 12, 2013, 17:10:45
Yes, but in that case (although the hosting company could do this for us) the real url is shown and we don't want that.

We need another solution.

Any ideas?

THAKS A LOT ANYONE WHO CAN HELP!