Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: enchesss on July 06, 2008, 12:59:28 PM
-
What is the best way to resolve a host name for a 2nd website that is set up in an ibay?
EG resolve www.myhostname2.yi.org to use the myhostname2.php file in /opt/myhostname2
have set up dns and copied joomla files to /opt/myhostname2 using ftp
just need to redirect to this folder from the (myhostname2 )ibay index.html that is able to be seen over the internet using a browser.
Preferably using the most secure method possible.
-
To clarify:
* http://www.myhostname.yi.org/myhostname2 now opens index.html from the ibay named myhostname2
* You have installed joomla in /opt/myhostname2
* You want http://www.myhostname2.yi.org to open the copy of joomla installed in /opt/myhostname2.
Is this all correct?
-
nearly.
www.myhostname2.yi.org actually opens the (myhostname2) index.html in the (myhostname2) ibay.
*to clarify: i do not have to use a forwardslash 'www.myhostname1.yi.org/myhostname2' to open the index.html in the myhostname2 ibay.
how do i get it to open the joomla cms that is installed in: /opt/myhostname2 folder?
i know this sounds confusing but it is apparently more secure to install in the opt folder. but with security comes complexity!
have read the redirect tutorial and am slowly digesting it but not sure about a few things.
Have started reading about rpms to get a better understanding but...
If someone has straight forward instructions to complete this last step then - #out with it!
-
enchesss
how do i get it to open the joomla cms that is installed in: /opt/myhostname2 folder?
Follow this howto
http://wiki.contribs.org/Web_Application_Redirect_Tutorial
have read the redirect tutorial and am slowly digesting it but not sure about a few things.
Do you magically expect us to know what things you are not sure about !!!!
Please ask specific questions, eg exactly what things are you not sure about ?
-
have read this tutorial but do not understand where to save the file
Enter the following code, having replaced foo with joomla, and save the file
It is taken from http://wiki.contribs.org/Web_Application_RPM Webserver Templates - a workaround to enable the application to be located in a domain or subdomain rootwith joomla
{
my $status = $joomla{'status'} || "disabled";
return " # joomla-status is disabled.\n"
unless $status eq 'enabled';
my $domain = $joomla{'domain'} || "disabled";
return " # no hostname or domain for joomla defined\n"
if $domain eq 'disabled';
my $DocRoot = "/opt/joomla";
$OUT = "";
$OUT .= "\n";
$OUT .= "# Redirect an existing hostname or domain to $DocRoot.\n";
$OUT .= "<VirtualHost 0.0.0.0:80>\n";
$OUT .= " ServerName $domain\n";
$OUT .= " DocumentRoot $DocRoot\n";
$OUT .= "</VirtualHost>\n";
$OUT .= "<VirtualHost 0.0.0.0:443>\n";
$OUT .= " ServerName $domain\n";
$OUT .= " DocumentRoot $DocRoot\n";
$OUT .= " SSLEngine on\n";
$OUT .= "</VirtualHost>\n";
}
does this file have to be saved in the fragment refered to in the previous step of this tutorial?
Create another fragment
pico -w /etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla
Then use the db command to configure the system to run joomla from the root of a virtual domain ie www.myvirtualdomain.com
-
enchesss
does this file have to be saved in the fragment refered to in the previous step of this tutorial?
Yes
It does say:
"Create another fragment
pico -w /etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla
Enter the following code, having replaced foo with joomla, and save the file ......"
Is that not understandable, if not then the wiki needs correction ?
Then use the db command to configure the system to run joomla from the root of a virtual domain ie www.myvirtualdomain.com
Note you do need the other template fragment that the joomla rpm installs by default in order for the db commands to work in the way outlined
As the Howto says:
Install Joomla using http://wiki.contribs.org/Joomla
This installs the Joomla CMS application in /opt/joomla
It also installs a fragment /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla
So get and manually install that fragment (92joomla) to the location specifiied
The generic version is here (but change text [foo >> joomla] etc to suit your needs):
http://wiki.contribs.org/Web_Application_RPM#Webserver_templates
or you can do a joomla rpm test install to another test server and copy the fragment.
-
mary
thank you for your help but it is difficult to understand what you mean.
So get and manually install that fragment (92joomla) to the location specifiied
If this file is saved (or modified somehow) as
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla
will it redirect BOTH websites in this way:
www.myhostname.yi.org/joomla to /opt/joomla
AND
www.myhostname2.yi.org to /opt/myhostname2?
There are several complications:
the redirection is needed for a SECOND website.
this tutorial:
http://wiki.contribs.org/Web_Application_Redirect_Tutorial
is for a single joomla site and is to redirect a url www.myhostname.com to the opt/joomla folder so that you do not have to type in www.myhostname/joomla.
it is not for a site that has been set up to use an ibay.
if there is a way to set up a second site without the use of an ibay then please let me know
e.g. do i need an ibay if i install joomla to opt/myhostname2?
are there any instructions about how to install a second joomla cms site to opt/myhostname2?
-
enchesss
While the example in the howto is not exactly the same as your situation, the information you need is there, you just do not know how to apply it.
As I'm understanding it, you have two Joomla websites in /opt/joomla1 and /opt/joomla2, then you need two copies of the fragments
eg
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla1
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla2
and
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla1
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainJoomla2
and the "names" in these frgaments will need to be edited accordingly ie joomla1 and joomla2 instead of joomla
You do not need to use an ibay as you are now using these templates to redirect the domain to /opt/joomla and /opt/joomla2
You will possibly need to find and change any templates that were installed for the original ibay installation (ie if there were any).
Search the forums as there was a thread on exactly this subject (two installs of joomla in /opt) a month of two ago, search on joomla
-
thank you for your help.
following the redirect turorial everything seemed to go ok but...
the browser window at www.myhostname1.yi.org now shows an html page giving a 403 forbidden - you do not have permission to access / on this server!
also
www.myhostname2.yi.org now points to the original html of myhostname1 that is a very basic index.html, not a joomla site.
-
enchesss
You should remove the ibay(s) for the domains in question.
Show output of
config show joomla1
and
config show joomla2
Did you change this in each copy of 80OptDomainJoomla1 and 80OptDomainJoomla2
my $DocRoot = "/opt/joomla";
-
Mary,
had already deleted ibay and
for 80OptDomainmyhostname1
changed
my $DocRoot = "/opt/foo
to my $DocRoot = "/opt/joomla
for myhostname1
and for 80OptDomainmyhostname2
my $DocRoot = "/opt/foo
to my $DocRoot = "/opt/myhostname2
for myhostname2
but there is another problem...
there is some confusion about the installation of joomla in opt/myhostname2:
is it ok to just copy all the files from opt/joomla to opt/myhostname2 using ftp?
also:
have tried to use sitemaker but cannot get a download. The site may be down...
will try again soon.
have read jumba's post here http://forums.contribs.org/index.php?topic=38878.30
seems that i am getting stuck on the same problems and issues.
because i had no access to my site using www.myhostname.yi.org
i deleted both 800 files and then ran
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith
everything is back to the start again.
i can access myhostname1 by going to www.myhostname1.yi.org/joomla
i have deleted opt/myhostname2 and the ibay myhostname2
what is the best way to install joomla in opt/myhostname2?
will it need to be downloaded again? or can the opt/joomla files be copied across?
-
enchesss
Read ALL of these threads
http://forums.contribs.org/index.php?topic=38878.msg185722#msg185722
http://forums.contribs.org/index.php?topic=39590.0
and this may also help
http://wiki.contribs.org/SME_Site_Maker
Use this to install Joomla
http://wiki.contribs.org/Joomla
Copy the /opt/joomla folder and the mysql db and the original template fragments to new names and then reinstall from the rpm again for the second iteration of joomla
-
Mary,
have read all these threads before and again.
have tried to install two joomla websites that can resolve to the opt folders without having to end the domain name with /joomla
i can not seem to install sitemaker - keep getting errors using all methods. think the site is down.
it has been spectacularly unsuccessful and although i have learnt heaps - i need to try and get it working some other way - just to see if it works.
i would like to try it another way. I have looked around and not found any instructions for installing a second joomla website into an ibay.
if i create an ibay myhostname2:
how do i install joomla in there?
does the cgi folder need to be used for certain files?
-
enchesss
If you want to install Joomla to a second ibay, then do it the same way you already installed Joomla to the first ibay. To my knowledge there is no rpm available for installing to an ibay, so you need to follow installation notes on the Joomla website ie unpack the tar.gz file & manually configure the configuration files and database etc.
Given your level of unsure knowledge, I think you would be better off removing the installations you have and starting again.
Do the first install to /opt/joomla using the Joomla contrib here
http://wiki.contribs.org/Joomla
Then follow the additional steps in this howto to point your virtualdomain at the /opt/joomla location
http://wiki.contribs.org/Web_Application_Redirect_Tutorial
The above should work reasonably smoothly if you follow instructions carefully and completely.
Only, and only when, you have the first site fully functional as you want it to be, then install a second copy of Joomla. If you install again using the contrib rpm, then you will probably overwrite the first installation (which you do not want to do), so in the second case you need to follow some manual steps outlined in this Howto.
You could copy the files from /opt/joomla to /opt/joomla2, but make sure that permissions stay the same.
The best way to achieve this is to pack the /opt/joomla folder as a tar.gz file and then unpack it to /opt/jooml2 or similar procedure that does not change permissions and ownership of files etc.
Then to configure other aspects eg templates and mysql database etc, follow the steps in
http://wiki.contribs.org/SME_Site_Maker
If you want to point another virtual domain at the second Joomla install in /opt/joomla2, then you will need to follow the additional steps in this howto to point your virtualdomain at the /opt/joomla2 location
http://wiki.contribs.org/Web_Application_Redirect_Tutorial
If you cannot undertstand how to do the above then you should not really be trying to do these things on a sme server and you should be paying someone else to do it for you.
You have access to all the information needed to achieve this task, and it's not really that difficult an issue.
-
Mary thanks you for your help,
I have reinstalled the first site again and the redirect tutorial has worked smoothly.
Took a while but am now fairly confident in following the procedure outlined.
Am going to try to to pack the opt/joomla file now and tehn unpack it to opt/joomla2
*these sites a purely for educational purposes.
i was going to use xubuntu but a fellow ubuntu friend recommended sme.
I hope that your patience and my mistakes have helped others who may want to achieve several small websites for a classroom.
I dont want to get political but the governemnt does not fund public education as well as they should.
Anything that promotes the use of linux and GNU should be worth the effort and now I hope to be able to assist.
-
Update:
have got both working.
had to change the order that some of the config commands were executed in:
config setprop joomla status enabled
config setprop joomla domain www.myvirtualdomain.com
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith
did not work alone
but entering the following did not work either
Warning:
This example refers to installation using the joomla rpm. When using the SiteMaker contrib, or doing additional installations of joomla or installing other rpms that do not setup default configuration db entries, it will be necessary to manually create the service entry and other db entries. In those cases you would do something like the following, as necessary.
config set joomla2 service
config setprop joomla2 DbName joomla2
config setprop joomla2 DbPassword joomla2passwordxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
config setprop joomla2 DbUser joomla2user
config setprop joomla2 Name Joomla2
config setprop joomla2 PublicAccess global
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith
Make sure you use the correct mysql db name, password & user, as already created for the joomla2 (or whichever) db in mysql.
i changed some of the order because config show myhostname2
was not giving the status or domain values so i did the configuration in this order and it has worked!
config setprop myhostname2 status enabled
config delprop myhostname2 domain
config setprop myhostname2 URL cms
expand-template /etc/httpd/conf/httpd.conf
sv h /service/httpd-e-smith
config setprop myhostname2 status enabled
config setprop myhostname2 domain www.myhostname2.yi.org
This last configuration has worked after much fiddling around with ALL the previous configuration commnads in several different orders.
When setting up a second application the order does matter but the way it has been done above could probably be made simpler.
Thanks for your help Mary - sorry for needing so much help. Hope it has sunk in!