*nix Thread, forwarding requests to new joomla website in Technical; Hi we have a Ubuntu server which is our web server which hosts the school website along with some other ...
-
2nd February 2009, 09:30 PM #1 forwarding requests to new joomla website
Hi we have a Ubuntu server which is our web server which hosts the school website along with some other web type things.
I have a question regarding forwarding requests to another site which sits on the sub level of htdocs
Our current site can be access at www.schoolname.bham.sch.uk but a joomla site has been created and sits in /var/www/joomla and we now want this website to be active when external users hit www.schoolname.bham.sch.uk
It may be a simple question but how do we forward all requests to www.schoolname.bham.sch.uk/joomla. We rather they go to www.schoolname.bham.sch.uk and it automatically forwards to www.schoolname.bham.sch.uk/joomla
Any help would be greatly appreciated.
Thanks
-
-
IDG Tech News
-
3rd February 2009, 10:30 AM #2 
Originally Posted by
ranj
DNS A RECORD
WEBHOST PANEL > DNS A RECORD > POINT TO SERVER IP
Last edited by ahuxham; 3rd February 2009 at 10:32 AM.
-
-
3rd February 2009, 10:34 AM #3 DNS is setup it will be an apache virtual server. I am no Linux expert I will let someone else explain how to do it.
-
-
3rd February 2009, 11:17 AM #4 Apache 1.3 URL Rewriting Guide
Moved DocumentRoot
Description:
Usually the DocumentRoot of the webserver directly relates to the URL ``/''. But often this data is not really of top-level priority, it is perhaps just one entity of a lot of data pools. For instance at our Intranet sites there are /e/www/ (the homepage for WWW), /e/sww/ (the homepage for the Intranet) etc. Now because the data of the DocumentRoot stays at /e/www/ we had to make sure that all inlined images and other stuff inside this data pool work for subsequent requests.
Solution:
We just redirect the URL / to /e/www/. While is seems trivial it is actually trivial with mod_rewrite, only. Because the typical old mechanisms of URL Aliases (as provides by mod_alias and friends) only used prefix matching. With this you cannot do such a redirection because the DocumentRoot is a prefix of all URLs. With mod_rewrite it is really trivial:
Code:
RewriteEngine on
RewriteRule ^/$ /e/www/ [R] Any use?
-
-
3rd February 2009, 11:24 AM #5 Still need a DNS A RECORD for all this, fair enough creating virtual directories and URL Rewriting, but you still need to foward schoolname.bham.sch.uk/joomla to the correct server.
I know our *.sch.uk is controlled by RM, others may be LEA, and the likes.
Say, your external IP address is 84.84.84.84, you'll want to redirect sch.uk/joomla to 84.84.84.84, from their in, you can redirect the traffic to the server. Virtual directory will than kick in and feed the Joomla website.
-
-
3rd February 2009, 12:44 PM #6 
Originally Posted by
ahuxham
Still need a DNS A RECORD for all this, fair enough creating virtual directories and URL Rewriting, but you still need to foward schoolname.bham.sch.uk/joomla to the correct server.
I know our *.sch.uk is controlled by RM, others may be LEA, and the likes.
Say, your external IP address is 84.84.84.84, you'll want to redirect sch.uk/joomla to 84.84.84.84, from their in, you can redirect the traffic to the server. Virtual directory will than kick in and feed the Joomla website.
Please, learn about the purpose of DNS, and read the OP. DNS is not for redirecting sub-directories, but for finding machines.
RabbieBurns is correct, those two line in your httpd.conf will be fine. They should be wrapped in IfMod statements too for safety, which you can find in the documentation.
-
-
3rd February 2009, 12:50 PM #7 
Originally Posted by
powdarrmonkey
Please, learn about the purpose of DNS, and read the OP. DNS is not for redirecting sub-directories, but for finding machines.
RabbieBurns is correct, those two line in your httpd.conf will be fine. They should be wrapped in IfMod statements too for safety, which you can find in the documentation.
Don't be patronising, take your elitist response elsewhere. No need to talk to me like that. I know how it works.
Typing: schoolname.sch.uk/joomla into google IS NOT going to redirect to an internal server in the school unless it already is setup that way. Many a school don't host their own websites.
EDIT: As an example: http://eportal.ourschool.sch.uk/ is a DNS A Record, pointing to our internal server, same can be said for ourschool.sch.uk/eportal
Last edited by ahuxham; 3rd February 2009 at 12:54 PM.
-
-
3rd February 2009, 12:55 PM #8 This person can get onto his site my putting in OpenDNS but he wants the ability just to put OpenDNS this is something to be done on the server. You can do it my a virtual apache server or what rippleburns says.
The face he can get onto the site by putting OpenDNS indicates his DNS is fine
-
-
3rd February 2009, 01:02 PM #9
Hi we have a Ubuntu server which is our web server which hosts the school website along with some other web type things.
In this case, the OP is clearly already hosting his own site, and the new site is going on the same box, so DNS is irrelevant. All he wants to do is make people arriving at / get a redirect to /joomla by HTTP.
I'm not intending to be patronising, but you're giving incorrect advice and insisting on it. If the OP doesn't understand DNS as well as you and I, and goes away and tries to figure it out by himself, it'll probably break what's already in place anyway. Complicating the problem doesn't help anybody, I don't see what's elitist about that.
I don't see what Google has to do with it, either.
-
-
3rd February 2009, 01:07 PM #10 
Originally Posted by
powdarrmonkey
In this case, the OP is clearly already hosting his own site, and the new site is going on the same box, so DNS is irrelevant. All he wants to do is make people arriving at / get a redirect to /joomla by HTTP.
I'm not intending to be patronising, but you're giving incorrect advice and insisting on it. If the OP doesn't understand DNS as well as you and I, and goes away and tries to figure it out by himself, it'll probably break what's already in place anyway. Complicating the problem doesn't help anybody, I don't see what's elitist about that.
I don't see what Google has to do with it, either.
Mistype on my part, and the elitist comment still stands, its not what was said, its the manner that you informed me.
However, reading the quote would imply that schoolname.sch.uk is currently redirecting to the internal server. Than DNS is fine, I read the original post with the opposite infact.
-
-
3rd February 2009, 01:19 PM #11 
Originally Posted by
ahuxham
Still need a DNS A RECORD for all this, fair enough creating virtual directories and URL Rewriting, but you still need to foward schoolname.bham.sch.uk/joomla to the correct server.

Originally Posted by
ahuxham
Mistype on my part, and the elitist comment still stands, its not what was said, its the manner that you informed me.
No offence intended.
The point was and still is that DNS only takes care of the first bit off the quoted address. DNS doesn't know or care about /joomla. What irritated me was that other posters already pointed this out, but you still posted it again with emphasis.
But you are right, I was brusque about it (perhaps I have been re-factoring other people's bad code for too long already today). So for that, I'm sorry. And now this thread is so far off topic, let's shake and make up and forget it.
-
-
9th February 2009, 02:46 PM #12 You need to edit a file in the etc/apache2/sites-available, called default i believe, in there you should see a reference to var/www that is just the root folder of your virtual apache host, change that to whatever directory path your new site is located in.
for example the file will look like (but with a lot more in the centre)
<VirtualHost *>
DocumentRoot var/www
ServerName www.schoolname.bham.sch.uk
</VirtualHost>
The document root (in bold here) is the one you want to edit with the directory you need it to refer to. /var/www/joomla
I have tested this on my machine at home and it works with no issues, you can also add subdomains ie vle.schoolname.bham.sch.uk etc if your DNS server will able to forward wildcards.
Below is the article I used to learn these parts of Apache2, its pretty simple when you get your head round it!
VirtualHost Examples - Apache HTTP Server
-
Thanks to Jamo from:
ranj (10th February 2009)
SHARE:
Similar Threads
-
By in forum Web Development
Replies: 12
Last Post: 22nd December 2011, 10:42 AM
-
By Zoom7000 in forum Web Development
Replies: 28
Last Post: 25th April 2009, 06:00 PM
-
By ninjabeaver in forum EduGeek Joomla 1.5 Package
Replies: 1
Last Post: 3rd October 2008, 01:57 PM
-
By sparkeh in forum EduGeek Joomla 1.5 Package
Replies: 8
Last Post: 30th June 2008, 05:29 PM
-
By ranj in forum General Chat
Replies: 3
Last Post: 28th February 2008, 12:30 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules