Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: pwgsc1 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
-
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:
<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.
-
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
-
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
-
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.
-
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?
-
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
-
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
-
How about a .htaccess redirect.
db accounts setprop Primary AllowOverride All
expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/rc7.d/S86httpd-e-smith restart
nano -w /home/e-smith/files/ibays/Primary/html/.htaccess
Cut and paste the following...
Redirect permanent / http://www.craigbursey.ca/joomla
Save and exit..
Control-X
-
How about Symlinks...
Back up old homepage.
mkdir -p /root/oldsite
mv /home/e-smith/files/ibays/Primary/html/* /root/oldsite/
Lets link the Primary ibay to the joomla files
ln -s /opt/joomla/* /home/e-smith/files/ibays/Primary/html/
Lets allow symlinks to be used in the primary ibay
db accounts setprop Primary FollowSymLinks enabled
Lets set the PHP sandbox for the primary ibay the same as joomla directory
db accounts setprop Primary PHPBaseDir /opt/joomla/:/tmp
PHP errors will display a blank page. Lets display the actual errors
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
nano -w /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling
Alter
display_errors = Off
to
display_errors = On
Control-x and save
Expand our new configuration files
expand-template /etc/httpd/conf/httpd.conf
expand-template /etc/php.ini
Now restart Apache
/etc/rc.d/rc7.d/S86httpd-e-smith restart
-
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...
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
-
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???
-
lucho there has been a lot of talk about installing websites into an ibay so use the search function and read a little
-
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?
-
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. :)
So why you answer like that?
Because your question goes for joomla, e107, rouncube <put your favourite site here>. Do you understand now?
-
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
-
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.
-
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
-
How about Symlinks...
Back up old homepage.
mkdir -p /root/oldsite
mv /home/e-smith/files/ibays/Primary/html/* /root/oldsite/
Lets link the Primary ibay to the joomla files
ln -s /opt/joomla/* /home/e-smith/files/ibays/Primary/html/
Lets allow symlinks to be used in the primary ibay
db accounts setprop Primary FollowSymLinks enabled
Lets set the PHP sandbox for the primary ibay the same as joomla directory
db accounts setprop Primary PHPBaseDir /opt/joomla/:/tmp
PHP errors will display a blank page. Lets display the actual errors
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
nano -w /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling
Alter
display_errors = Off
to
display_errors = On
Control-x and save
Expand our new configuration files
expand-template /etc/httpd/conf/httpd.conf
expand-template /etc/php.ini
Now restart Apache
/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 thandb accounts setprop Primary FollowSymLinks disabled
Or will that even work at all?
Thanks a bunch!
Ryan
-
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:
<html>
<head>
<META http-equiv="refresh" content="0;URL=http://www.mydomain.com/joomla">
</head>
</html>