+ Post New Thread
Results 1 to 12 of 12
*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 ...
  1. #1
    ranj's Avatar
    Join Date
    Feb 2006
    Location
    Birmingham
    Posts
    732
    Thank Post
    100
    Thanked 42 Times in 32 Posts
    Rep Power
    25

    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

  2. #2
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    31
    Quote Originally Posted by ranj View Post
    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
    DNS A RECORD

    WEBHOST PANEL > DNS A RECORD > POINT TO SERVER IP
    Last edited by ahuxham; 3rd February 2009 at 10:32 AM.

  3. #3

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    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.

  4. #4

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,532
    Thank Post
    1,341
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    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?

  5. #5
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    31
    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.

  6. #6

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Quote Originally Posted by ahuxham View Post
    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.

  7. #7
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    31
    Quote Originally Posted by powdarrmonkey View Post
    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.

  8. #8

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,314
    Thank Post
    901
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    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

  9. #9

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    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.

  10. #10
    ahuxham's Avatar
    Join Date
    Apr 2008
    Posts
    1,122
    Thank Post
    76
    Thanked 138 Times in 109 Posts
    Rep Power
    31
    Quote Originally Posted by powdarrmonkey View Post
    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.

  11. #11

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Quote Originally Posted by ahuxham View Post
    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.
    Quote Originally Posted by ahuxham View Post
    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.

  12. #12
    Jamo's Avatar
    Join Date
    Jan 2009
    Posts
    1,361
    Thank Post
    66
    Thanked 178 Times in 150 Posts
    Rep Power
    61
    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

  13. Thanks to Jamo from:

    ranj (10th February 2009)



SHARE:
+ Post New Thread

Similar Threads

  1. Creating A School Website With Joomla E-Book
    By in forum Web Development
    Replies: 12
    Last Post: 22nd December 2011, 10:42 AM
  2. Good UK Host for Joomla Website
    By Zoom7000 in forum Web Development
    Replies: 28
    Last Post: 25th April 2009, 07:00 PM
  3. Joomla 1.5 School Website
    By ninjabeaver in forum EduGeek Joomla 1.5 Package
    Replies: 1
    Last Post: 3rd October 2008, 02:57 PM
  4. Joomla/website advice
    By sparkeh in forum EduGeek Joomla 1.5 Package
    Replies: 8
    Last Post: 30th June 2008, 06:29 PM
  5. Joomla website down
    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
  •