Now possible to seperate source from configuration and data

Read important announcements about Group-Office here

Moderator: Developers

mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Now possible to seperate source from configuration and data

Postby mschering » Tue Mar 01, 2005 9:26 am

With the new changes it's possible to seperate the installation specific data from the source package of Group-Office.

To do this you need root privileges and you need to set GO up in the following way:

1. upgrade GO with latest CVS and make sure you choose to put your configuration file in: /etc/Group-Office/APACHE SERVERNAME/groupoffice/subdir/config.php
2. When it asks where your local dir should be choose a folder outside the document root.
For example the user home dirs can be in /home/groupoffice/users and the local dir can be in /home/groupoffice/local
3. Now create an alias for the local dir so it's accessible through apache. In your virtual host section add : Alias /local/ "/home/groupoffice/local"

Now you can put the source of go into for example /usr/src/groupoffice-pro-2.11
and you can create links to it from your installations:

ln -s /var/www/html/groupoffice /usr/src/groupoffice-pro-2.11

Good luck!
Best regards,

Merijn Schering
Intermesh
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

How do use if no own server?

Postby angelodi » Wed Mar 02, 2005 7:50 am

Hi,

great to know that it is poossible now to seperate data from source:-)

But when i understand everything, then this solution is working only for users who have an own server and having access to apache directory and so on:(

Many users, me too, does not have an own server. I am using a hosting provider for my group-office installation. The provider will not do any changes for me:(

Is there a possibility that i can use this solution too?

I describe my settings, maybe you can correct this, ans maybe this is enoegh that your soultion works for me too, then other users with the same problem can use this solution too:-)

My root path:
/www/htdocs/mygo/go/

Note: When i login to my webspace via ftp, my root folder which i can access show as first subdir "mygo", so i do not see "htdocs/".

My storage path:
/www/htdocs/mygo/files

My mime types path (because, i have no access to the "/etc/" directory!):
/www/htdocs/mygo/go/lib/mime.types

My tmp folder:
/tmp/

So...is it possible with such a facility that i can use your solition too?

Where i have to put which file?
Where i have to put the Alias?
Where and how and in which file i have to put the links?

Regards Angelo
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Postby mschering » Wed Mar 02, 2005 8:41 am

Then you should do some hacking into Group-Office.php
It looks for /etc/Group-Office/servername/subdir/to/groupoffice/ in the function get_configuration_file().
You could change it to look for it in for example:

/www/htdocs/mygo/conf/groupoffice1/config.php

Just remember to put this hack in everytime you upgrade.
I can make this location of the config file configurable because it's looking for the configuration fil e ;)

Good luck!
Best regards,



Merijn Schering

Intermesh
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

Re: Now possible to seperate source from configuration and d

Postby angelodi » Sat Mar 04, 2006 8:53 am

Intermesh wrote:With the new changes it's possible to seperate the installation specific data from the source package of Group-Office.

To do this you need root privileges and you need to set GO up in the following way:

1. upgrade GO with latest CVS and make sure you choose to put your configuration file in: /etc/Group-Office/APACHE SERVERNAME/groupoffice/subdir/config.php
2. When it asks where your local dir should be choose a folder outside the document root.
For example the user home dirs can be in /home/groupoffice/users and the local dir can be in /home/groupoffice/local
3. Now create an alias for the local dir so it's accessible through apache. In your virtual host section add : Alias /local/ "/home/groupoffice/local"

Now you can put the source of go into for example /usr/src/groupoffice-pro-2.11
and you can create links to it from your installations:

ln -s /var/www/html/groupoffice /usr/src/groupoffice-pro-2.11

Good luck!


Hi, i try it what you wrote....but i do not understand especially issue 1.

Is it possible to create a short step by step tutorial?

I try it..but i guess something is still wrong, so please just correct it:

0. Needs: Have GO >= 2.11 available, have a running Apache-Webserver, have Linux (i use Suse 9.3), have a mysql-database-user created.
1. login as root
2. Create directory "/etc/groupoffice/YOURDOMAINNAME/groupoffice/cfg
3. Copy config.php to this directory and edit it with your needed settings
4. Create Directorys /home/groupoffice/users and /home/groupoffice/local
(repeat steps 2. and 4. for all domains you need)
(use the in step 4. created local directory as path for the local-variable in your config.php)
(OPEN Question: How is the URL for the "local" variable? Can anyone help?)
5. Create Directory "/usr/src/groupoffice and copy/extract the whole content of the groupoffice-package to this directory
6. Edit http.conf within your apache directory (often in /etc/apache2):
In your virtual host section add : Alias /local/ "/home/groupoffice/local"
7. Create links in each of your wanted domains:
ln -s /home/groupoffice/public_html /usr/src/groupoffice
8. Finisehd...call your domains one by one and do normal group-office install steps

Attention: I does not use this really..so do not try it whit my example! It is only a step by step tutorial and i guess the todo steps...i hope intermesh or other users can use this example to make a very easy and correctly step by step tutorial.

Regards Angelo
Last edited by angelodi on Sat Mar 11, 2006 9:11 am, edited 4 times in total.
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

Postby angelodi » Thu Mar 09, 2006 8:42 am

...really no comments?

Is there noone who needs one group office source installation on one server with many group office communities?

Remember..my step by step tutorial is not working....there are some errors....but maybe the folk can help to create to make this step by step tutorial working and we can create an easy step by step tutorial:-)

Example:
1 Server
1 Group Office source installation
2 or more different Group Office communities with different domains and different databases

The big advance is, with an update of Group Office we need to update just one source installation (and another advane is to safe harddisk space..but ok...is today just a little advance)...so we an easier adaministration:-)

Regards Angelo
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Postby mschering » Thu Mar 09, 2006 2:30 pm

Why isn't it working? What happens?
Best regards,



Merijn Schering

Intermesh
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

Postby angelodi » Sat Mar 11, 2006 9:18 am

Intermesh wrote:Why isn't it working? What happens?


...nothing happens...if i call the correct URL "http://mydomain.com/groupoffice" i thought automaticly index.php will be called and installation would begin, but instead i get a site access error (access denied, because there are no files..no index.php and no index.htm/index.html).

Thats true (that i do not have any file there), but i thought with creating the symlink in step 7. it will automaticly linked/forwarded to the groupoffice sourceinstallation.

So i am a linux beginner...i have done all steps as described....mabye it was wrong to to do all steps as "root" (because, you intermesh wrote login as root and so i have done all steps as root and all dir and files have now rights for user root) so mabye just the access rights are wrong and i have only to change these via chmod....but which files/directorys i have to change to which rights?

Regards Angelo
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

Postby angelodi » Mon Mar 13, 2006 11:19 am

...no ideas?

Regards Angelo
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

Postby angelodi » Tue Mar 14, 2006 11:06 am

...i have changed now the rights from user "root"/"root" to user "mydomain"/"www" and recreate the symbolic link.

But same error...i have my groupoffice source in /usr/src/groupoffice and my html is in /home/html/groupoffice (but there i have no files, because i need there no files..or do i need files there, which?) and therefore i have created a symbolic link: ln -s /home/html/groupoffice/go /usr/src/groupoffice and after that i find a new entry: /usr/src/groupoffice/~go which means this is the symbolic link.

I thought i need only all files within /usr/src/groupoffice and no files within /home/html/groupoffice/go, i am wrong?

Regards Angelo
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Postby mschering » Tue Mar 14, 2006 7:13 pm

Is FollowSymlinks or something like that enabled in Apache?
Best regards,



Merijn Schering

Intermesh
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

Postby angelodi » Wed Mar 15, 2006 11:28 am

Intermesh wrote:Is FollowSymlinks or something like that enabled in Apache?


Is this in /etc/apache2/httpd.conf enough? Then yes, it is enabled.

<Directory />
Options -Indexes +FollowSymlinks +Includes
AllowOverride All
</Directory>

Regards Angelo
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Postby mschering » Thu Mar 16, 2006 7:51 am

ln -s /home/html/groupoffice/go /usr/src/groupoffice

this is the wrong command:

it's ln -s TARGET LINKNAME

so it should be:

ln -s /usr/src/groupoffice /home/html/groupoffice/go

Now you need to point the document root of apache to /home/html/groupoffice/go
Best regards,



Merijn Schering

Intermesh
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

Postby angelodi » Thu Mar 16, 2006 7:06 pm

Intermesh wrote:...
Now you need to point the document root of apache to /home/html/groupoffice/go


Thanks for correcting the "ln" command...but i do not understand last line?

Do you mean i have to edit the httpd.conf?

Regards Angelo
mschering
Site Admin
Site Admin
Posts: 8154
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Postby mschering » Fri Mar 17, 2006 8:14 pm

Yes, put DocumentRoot=/path/to/groupoffice/symlink in the virtualhost section.
Best regards,



Merijn Schering

Intermesh
angelodi
Posts: 145
Joined: Fri Apr 23, 2004 7:05 am

Postby angelodi » Sun Mar 19, 2006 8:08 am

...hmm..it does not work....if i call the url, i get this error:

"Warning: mysql_connect(): Access denied for user 'mygroupofficewwwuser'@'localhost' (using password: NO) in /usr/src/groupoffice/database/mysql.class.inc on line 89
Database error: connect(, , $Password) failed.
MySQL Error: ()
Session halted."

But i have set the correct user and pwd in the config.php!

If i call my correct url and go directly to the install dir ....\install\install.php, then i get in first line:

"Warning: mysql_connect(): Access denied for user 'mygroupofficewwwuser'@'localhost' (using password: NO) in /usr/src/groupoffice/database/mysql.class.inc on line 89
"

And after that, i see on the left a menue like:

LOGO of Intermesh_________________GroupOfficeINstallation____
System test: ............
License: .............
Relese notes:...................
and so on til..
Send information:............

On the right i see this text:

"he configuration file does not exist. You must create a writable configuration file at one of the following locations:

1. /etc/Group-Office/myurl.com/usr/src/groupoffice/config.php
2. /usr/src/groupoffice/config.php

The first location is more secure because the sensitive information is kept outside the document root but it does require root privileges on this machine.
The second advantage is that you will be able to seperate the source from the configuration. This can be very usefull with multiple installations on one machine. If you choose this location then you have to make sure that in Apache's httpd.conf the following is set:

UseCanonicalName On
This is to make sure it always finds your configuration file at the correct location.

$ touch config.php (Or FTP an empty config.php to the server)
$ chmod 666 config.php
"

I have the config.php as described in 1.
And i have changed it to 666.

What could be the problem, and ideas?

Regards Angelo

Return to “Announcements”

Who is online

Users browsing this forum: No registered users and 1 guest

cron