Results 1 to 4 of 4

Thread: 2 servers - 1 domain function.

  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default 2 servers - 1 domain function.

    Hello everyone,

    First of all I apologize if this has been asked before (I couldn't find it on the forum)...

    I need some advice (and quite possibly further instructions on how to achieve the following scenario).

    Server 1 has an IP of 45.40.40.40 with a Joomla installation, running lighttpd with fastcgi and rewrite rules, working flawlessly at domain example.com

    Server 2 has an IP of 55.50.50.50 with a Java LMS, running on Tomcat (port 8080) with a context path of /lmspath. The LMS works when typing : 55.50.50.50:8080/lmspath (actually redirecting to55.50.50.50:8080/lmspath/dmz).

    As you may have guessed by now, I am trying to make Server 2 being called when someone types : example.com/lmspath and any of its subfolders (i.e. example.com/lmspath/repository etc.).

    Coming across some similar articles I believe mod_proxy has to be used (I could be wrong, so if I am and there's a better way, please, correct me) ?

    However I have been unable to do so (getting a 404 error) so far.
    Here's an extract of Server 1's lighttpd.conf :

    Code:
    #Lighttpd re-writes
    url.rewrite-if-not-file = (
    "^/$" => "$0",
    "^/(authorcentral|awstats|phpmyadmin|administrator).*" => "$0",
    "^/(.*)" => "/index.php/$1"
    )
    
    #Example Proxy redirect - DOES NOT WORK!
    $HTTP["url"] =~ "^/lmspath/" {
    proxy.server = (
    "" => ( (
    "host" => "55.50.50.50",
    "port" => 8080
    ) )
    )
    }
    I have enabled "mod_proxy" (actually added the line - wasn't in the conf before) and lighttpd DOES start. But for some reason I still get the dreaded 404 error.

    Anyone has a solution for such a scenario?

    Thanks in advance!,

    Alex
    Last edited by technetgr; 2nd May 2011 at 12:45 AM. Reason: Clarification of question.

  2. #2
    Senior Member
    Join Date
    Jul 2006
    Location
    India, Delhi
    Posts
    208
    Thanks
    3
    Thanked 1 Time in 1 Post
    Rep Power
    9

    Default

    Hi

    Just a guess here....

    $HTTP["url"] =~ "^/lmspath/" {
    proxy-core.backends = ( "55.50.50.50:8080" )
    Last edited by kasimani; 10th May 2011 at 05:14 PM.

  3. #3
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Tried the "noslash" case as well, but it didn't work...

    What DID work though is the following command (in case anyone is interested in a similar scenario).

    proxy.server = (
    "/lmspath" => ( (
    "host" => "55.50.50.50",
    "port" => 8080,
    "fix-redirects" => 1
    ) ) )

  4. #4
    Senior Member
    Join Date
    Jul 2006
    Location
    India, Delhi
    Posts
    208
    Thanks
    3
    Thanked 1 Time in 1 Post
    Rep Power
    9

    Default

    ok cool...

    Thanks for input

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 16th October 2011, 12:55 AM
  2. Replies: 4
    Last Post: 21st September 2010, 05:16 PM
  3. Call Function Within Function [PHP]
    By eawedat in forum Coding in General
    Replies: 1
    Last Post: 4th June 2010, 09:08 PM
  4. Allow only open dns servers on port 53 and block all other public DNS servers
    By onehomelist in forum Networking, Firewalls and Security
    Replies: 12
    Last Post: 4th February 2010, 01:55 PM
  5. Replies: 2
    Last Post: 6th June 2008, 12:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •