LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-07-2010, 01:36 AM   #1
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
lighttpd + tomcat + a custom rewrite rule


Hello, I just setup lighttpd as a web server, tomcat as an application server in which there is meshcms running.
Tomcat is setup to run on localhost port 8080 and is proxied using lighttpd like this:

Code:
$HTTP["host"] == "tomcat.example.org" {
    server.document-root = "/srv/www"
    server.errorlog = "/var/log/lighttpd/tomcat_error.log"
    accesslog.filename = "/var/log/lighttpd/tomcat_access.log"
    server.max-keep-alive-requests = 20
    server.tag = "lighttpd"
    proxy.server = ( "" =>
  		       ( (
		           "host" => "127.0.0.1",
		           "port" => 8080
		          ) 
			)
	     )
}
Now, when I wanna access the meshcms app, I need to call it this way:

http://localhost/meshcms or http://tomcat.example.org/meshcms.

Is it possible in lighttpd to create a rule which will allow me to use the url from this http://tomcat.example.org/meshcms/index.html to http://tomcat.example.org/index.html ?

In tomcat wouldn't be very easy as it's deployed as a war, but I suppose in lighttpd using some kind of a rewrite rule could be possible. I'm not good at all at rewrite rules, so please anyone if you got some ideas let me know.

Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache2 rewrite rule help razzera Linux - Server 7 08-17-2010 04:39 PM
httpd rewrite rule jnojr Linux - Server 5 01-25-2010 11:28 PM
Need help with apache Rewrite Rule? your_shadow03 Linux - Newbie 1 01-21-2010 07:12 AM
Apache rewrite rule help kinetik Linux - Software 1 11-05-2007 11:18 AM
i need a rewrite rule!help arcow Linux - Enterprise 1 07-03-2007 05:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration