LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 07-15-2005, 10:19 AM   #1
belorion
Member
 
Registered: Aug 2003
Distribution: Slackware 10.0
Posts: 124

Rep: Reputation: 16
apache proxypass, or lighttpd php


I have a website on a host the is being proxypassed through Apache to a lighttpd server.

Unfortunately, the lighttpd server doesn't "know" how to handle .php files.

So, I have 2 questions then:

1) What do I need to do to get lighttpd to understand .php files?

2) Barring that, is there a way to tell apache to proxy pass everything *but* requests sent to www.mydomain.com/forums? (where all the php stuff is)


Thanks.
 
Old 07-15-2005, 10:40 AM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
mod_rewrite

http://httpd.apache.org/docs/mod/mod_rewrite.html
http://httpd.apache.org/docs/misc/rewriteguide.html

Quickly: something like:

Code:
RewriteEngine On

RewriteCond %{PATH_INFO} !^forum
RewriteRule ^(.*) http://internalserver$1 [P]

RewriteCond %{PATH_INFO} ^forum
RewriteRule ^/forum(.*) /parth/to/forum$1
*may* work, you'll have to try, if it doesn't work read the two docs above and have a fiddle

I have no experience with lighttpd, so can't help you with that

Last edited by phil.d.g; 07-15-2005 at 10:43 AM.
 
Old 07-15-2005, 11:07 AM   #3
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Sorry I made a mistake, in both RewriteCond lines replace '%{PATH_INFO}' with '$1', of course without the quotes, so it should read
Code:
RewriteEngine On

RewriteCond $1 !^forum
RewriteRule ^(.*) http://internalserver$1 [P]

RewriteCond $1 ^forum
RewriteRule ^/forum(.*) /parth/to/forum$1
Please accept my apologies

Last edited by phil.d.g; 07-15-2005 at 11:09 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 11:25 AM
lighttpd: multiple virtual hosts? neocookie Linux - Software 8 03-27-2006 11:37 PM
Apache proxypass url prob collen Linux - Software 0 10-14-2005 07:59 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-18-2004 12:10 AM
Apache ProxyPass/VirtualHost question lil_drummaboy Linux - Networking 2 11-10-2004 12:53 PM


All times are GMT -5. The time now is 12:34 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration