Koozali.org: home of the SME Server

Want Joomla to load as my homepage not what's in Primary

Offline pwgsc1

  • ****
  • 93
  • +0/-0
Want Joomla to load as my homepage not what's in Primary
« on: February 05, 2007, 02:18:33 AM »
Hi Folks,

I've installed the Joomla contrib from Dungog that puts it in the  /opt folder.  To get to it I have to put in my URL /joomla.  Now that I have joomla configed I want to setup  my server so when someone hit's my URL, it automatically goes to /opt/joomla.

I'm thinking it's an Alias entry in httpd.conf???  Am I close or way off base?

Thanks,

Craig

egerards

Want Joomla to load as my homepage not what's in Primary
« Reply #1 on: February 05, 2007, 08:33:24 AM »
Adjusting your httpd.conf (by modifying templates) is one way, but you might also consider placing an index.html in your ...../Primary/html/ directory with the following content:
Code: [Select]
<html>
<head>
<script language="JavaScript">

function gotoURL(url) {
        top.location.href = url;
}
</script>
</head>

<body onload="gotoURL('http://yourdomain/yoomla/index.php')">
</body>
</html>


This will automatically redirect the visitor to the right location.

Offline pwgsc1

  • ****
  • 93
  • +0/-0
Want Joomla to load as my homepage not what's in Primary
« Reply #2 on: February 05, 2007, 01:09:47 PM »
Thanks Eric.

I'll give that a try.  But I don't think it's going to work because I have an issue under SME Server 7 that won't allow me to access my Primary, I get a  Forbidden 403.... message.

But you never know, by changing the index.htm it might do the trick.  I'll give it a try when I get home.

Craig

Offline pwgsc1

  • ****
  • 93
  • +0/-0
Want Joomla to load as my homepage not what's in Primary
« Reply #3 on: February 06, 2007, 03:52:20 PM »
Eric,

Didn't work because of my problem with the Forbidden access to my Primary.  I've searched on the web and have gone through my httpd.conf file line by line and have not found what the problem could be. Wouldn't know another method I could redirect?

Thanks for the help,

Craig

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Want Joomla to load as my homepage not what's in Primary
« Reply #4 on: February 06, 2007, 03:55:38 PM »
Quote from: "pwgsc1"
Didn't work because of my problem with the Forbidden access to my Primary.  
Could this be the php_basedir restriction? For more information do a search om the forum.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Want Joomla to load as my homepage not what's in Primary
« Reply #5 on: February 06, 2007, 05:04:45 PM »
Why not copy the contents of /opt/joomla to your primary ibay and delete the index.html, adjusting your configuration.php with your new path?

Offline raem

  • *
  • 3,972
  • +4/-0
Want Joomla to load as my homepage not what's in Primary
« Reply #6 on: February 06, 2007, 05:14:58 PM »
pwgsc1

>....I have an issue under SME Server 7 that won't allow me to access my > Primary, I get a  Forbidden 403.... message.

Try this to see if it fixes the problem, it should reset everything to defaults
signal-event post-upgrade
reboot
...

Offline pwgsc1

  • ****
  • 93
  • +0/-0
Solved!
« Reply #7 on: February 06, 2007, 11:02:36 PM »
Ray,

Thank you very much.  That command did the trick, I can now get my ugly old homepage.  Hopefully Eric's script will do the redirection to my new joomla homepage.

Thanks everyone for their help,

Craig

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Want Joomla to load as my homepage not what's in Primary
« Reply #8 on: February 10, 2007, 02:06:13 AM »
How about a .htaccess redirect.

Code: [Select]
db accounts setprop Primary AllowOverride All
expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/rc7.d/S86httpd-e-smith restart


Code: [Select]
nano -w /home/e-smith/files/ibays/Primary/html/.htaccess


Cut and paste the following...
Quote
Redirect permanent / http://www.craigbursey.ca/joomla


Save and exit..
Code: [Select]
Control-X
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Want Joomla to load as my homepage not what's in Primary
« Reply #9 on: February 10, 2007, 02:13:56 AM »
How about Symlinks...

Back up old homepage.
Code: [Select]
mkdir -p /root/oldsite
mv /home/e-smith/files/ibays/Primary/html/* /root/oldsite/

Lets link the Primary ibay to the joomla files
Code: [Select]
ln -s /opt/joomla/* /home/e-smith/files/ibays/Primary/html/
Lets allow symlinks to be used in the primary ibay
Code: [Select]
db accounts setprop Primary FollowSymLinks enabled
Lets set the PHP sandbox for the primary ibay the same as joomla directory
Code: [Select]
db accounts setprop Primary PHPBaseDir /opt/joomla/:/tmp
PHP errors will display a blank page. Lets display the actual errors
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/php.ini
cp /etc/e-smith/templates/etc/php.ini/30ErrorHandling /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling

Lets edit our custom template
Code: [Select]
nano -w /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling
Alter
Code: [Select]
display_errors = Off
to
Code: [Select]
display_errors = On
Control-x and save

Expand our new configuration files
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
expand-template /etc/php.ini

Now restart Apache
Code: [Select]
/etc/rc.d/rc7.d/S86httpd-e-smith restart
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Want Joomla to load as my homepage not what's in Primary
« Reply #10 on: February 10, 2007, 05:31:38 AM »
A variation to the above.

Go into server-manager >> Information bays

Create a new ibay called linkbay

Go into server-manager >> Domains

Point you primary domain to the new linkbay ibay

Now do the following as root...
Code: [Select]
rm -f /home/e-smith/files/ibays/linkbay/html/*
ln -s /opt/joomla/* /home/e-smith/files/ibays/linkbay/html/
db accounts setprop linkbay FollowSymLinks enabled
db accounts setprop linkbay PHPBaseDir /opt/joomla/:/tmp
signal-event ibay-modify
Regards,
William

IF I give advise.. It's only if it was me....

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Want Joomla to load as my homepage not what's in Primary
« Reply #11 on: March 20, 2007, 03:09:45 PM »
Why dont you simply install joomla in a ibay, and then put that ibay like primary. In fact i dont know why dungog contrib not install joomla in a ibay, there is any problem doing that???

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Want Joomla to load as my homepage not what's in Primary
« Reply #12 on: March 20, 2007, 04:40:31 PM »
lucho there has been a lot of talk about installing websites into an ibay so use the search function and read a little
"It should just work" if it doesn't report it. Thanks!

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Want Joomla to load as my homepage not what's in Primary
« Reply #13 on: March 20, 2007, 05:08:04 PM »
Quote
lucho there has been a lot of talk about installing websites into an ibay so use the search function and read a little

have you read my post? iam talking about the joomla , because this Topic is about it.
So why you answer like that?

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Want Joomla to load as my homepage not what's in Primary
« Reply #14 on: March 20, 2007, 06:17:46 PM »
Quote from: "lucho115"
In fact i dont know why dungog contrib not install joomla in a ibay, there is any problem doing that???

I have quotet text in bold just for you.  :)

Quote
So why you answer like that?

Because your question goes for joomla, e107, rouncube <put your favourite site here>. Do you understand now?
"It should just work" if it doesn't report it. Thanks!

Offline lucho115

  • *****
  • 209
  • +0/-0
    • http://www.elac.com.ar
Want Joomla to load as my homepage not what's in Primary
« Reply #15 on: March 20, 2007, 06:27:23 PM »
i dont care the others cms, i ask for joomla because maybe only joomla have some issue installing into an IBAY, thats was the spirit of my question, and if you know the answer please put it, just that.
tks

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Want Joomla to load as my homepage not what's in Primary
« Reply #16 on: March 20, 2007, 06:33:16 PM »
Every <put your script here> script will work from an ibay. But the prefered way of installing it would be into /opt (security reasons). Does this answer your question?

And yes i do know the answer but i guess you're too lazy or ignorant to check some other posts. There have been quite a few posts that explain why you should install in /opt not in an ibay and they have nothing to do with yoomla. They talk about ALL CMS scripts and joomla is not special.
Dungog is making secure scripts and they are installed just where they should be.

Now i hope that you can put this topic to rest because you really should read some other posts about why and why not install something in ibay.
"It should just work" if it doesn't report it. Thanks!

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Want Joomla to load as my homepage not what's in Primary
« Reply #17 on: April 13, 2007, 05:26:01 AM »
Lucho,

If you really, really want to do this, then here is how I did it on a test server.

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts

cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts

cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent .

cp 20IbayContent 19IBayContent

pico -w 19IbayContent
    remove everything after line 28, except the last }
    modify the DocumentRoot line and replace $basedir/html with /opt/joomla
    Change the ScriptAlias and Alias lines to suit you.      

pico -w 20IbayContent
    (remove lines 14 - 29)  This is what you have in 19IbayContent.  If you don't remove these lines, then the last entry for DocumentRoot wins and you will be taken to the default index.html file in the Primary/html ibay directory.

expand-template /etc/httpd/conf/httpd.conf

pico -w /etc/httpd/conf/httpd.conf
  search for joomla - you should see that it is now set as the documentroot

/etc/rc7.d/S86httpd-e-smith restart

Open your browser to the servers default page and joomla should come up.

I have the sample data loaded and when I click on an article the url has www.mydomain.com/joomla/.... appended.  If you don't want joomla to appear here, then
pico -w /opt/joomla/configuration.php and change line 10 and just drop the /joomla from the end.  At least that's all I had to do.

The only thing you have to look for is if there were any changes made to 20IbayContent from any upgrades, that would need to be updated in your templates-custom directory.

I don't know joomla well enough to do a lot of testing, but that is what worked for me.

If you try this, I'd like to know how it worked out for you.

Good Luck,

John Bennett
......

Offline haymann

  • *
  • 212
  • +0/-0
Want Joomla to load as my homepage not what's in Primary
« Reply #18 on: July 25, 2007, 11:12:44 PM »
Quote from: "william_syd"
How about Symlinks...

Back up old homepage.
Code: [Select]
mkdir -p /root/oldsite
mv /home/e-smith/files/ibays/Primary/html/* /root/oldsite/

Lets link the Primary ibay to the joomla files
Code: [Select]
ln -s /opt/joomla/* /home/e-smith/files/ibays/Primary/html/
Lets allow symlinks to be used in the primary ibay
Code: [Select]
db accounts setprop Primary FollowSymLinks enabled
Lets set the PHP sandbox for the primary ibay the same as joomla directory
Code: [Select]
db accounts setprop Primary PHPBaseDir /opt/joomla/:/tmp
PHP errors will display a blank page. Lets display the actual errors
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/php.ini
cp /etc/e-smith/templates/etc/php.ini/30ErrorHandling /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling

Lets edit our custom template
Code: [Select]
nano -w /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling
Alter
Code: [Select]
display_errors = Off
to
Code: [Select]
display_errors = On
Control-x and save

Expand our new configuration files
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
expand-template /etc/php.ini

Now restart Apache
Code: [Select]
/etc/rc.d/rc7.d/S86httpd-e-smith restart
This worked great with the Worpress contrib I just installed, but I had a quick question. I I ever want to undo this for some reason, is there more to it than
Code: [Select]
db accounts setprop Primary FollowSymLinks disabledOr will that even work at all?
Thanks a bunch!
Ryan

Offline JohnG

  • ****
  • 89
  • +0/-0
Re: Want Joomla to load as my homepage not what's in Primary
« Reply #19 on: July 26, 2007, 06:11:39 AM »
Quote from: "pwgsc1"
Hi Folks,

I've installed the Joomla contrib from Dungog that puts it in the  /opt folder.  To get to it I have to put in my URL /joomla.  Now that I have joomla configed I want to setup  my server so when someone hit's my URL, it automatically goes to /opt/joomla.

I'm thinking it's an Alias entry in httpd.conf???  Am I close or way off base?

Thanks,

Craig

I took the quick and dirty approach and just changed index.htm in the primary to refresh to joomla:
Code: [Select]
<html>
<head>
<META http-equiv="refresh" content="0;URL=http://www.mydomain.com/joomla">
</head>
</html>