LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache RewriteRule is driving me nuts (https://www.linuxquestions.org/questions/linux-software-2/apache-rewriterule-is-driving-me-nuts-164113/)

ijsman77 03-30-2004 07:10 AM

Apache RewriteRule is driving me nuts
 
I've just finished installing Mandrake 10.0 including apache and Zope.

I want to use apache to server some normal pages and to server zope pages as well.
This is what i've written in my Vhosts:

NameVirtualHost *:80

<VirtualHost *:80>
Servername mydomain
DocumentRoot /var/www/html
</VirtualHost>


### the above is to catch all requests that don't have a valid servername

<VirtualHost *:80>
ServerName mydomain
RewriteEngine on
RewriteRule ^/(.*) xxx.xxx.xxx.xxx:8080/mandrake/$1 [L,P]
ErrorLog /var/log/apache/testerror.log
</VirtualHost>

#this one is to send a request from mydomain to my zope url


##end

now my index page from /var/www/html is being served fine, but when i enter mydomain i get this message in my browser:

Forbidden
You don't have permission to access / on this server.

The log file has this line in it:
client denied by server configuration: proxy:xxx.xxx.xxx.xxx:8080/mandrake/


I don't understand this at all since i am not pointing to / but to my zope url.

Can someone pelase tell me what i am doing wrong?

the server is in my own private network here, that's why i've entered the xxx address :P

ugge 04-06-2004 09:38 AM

I'm a bit lost in the setup.
What is the URL for your ordinary domain, and what is the URL for your Zope content?
Also where are the ordinary web site located locally?
Where is the Zope content located locally?

As far as I can see from the rewriterule you match an address but don't substitute it with anything.
What I have read first column i rewriterule, second is pattern, third is substitution and fourth is flags.

ugge 04-06-2004 10:36 AM

Have spent a little more time thinking.
What actually are you trying to accomplish?
How do you want it to work?
Wouldn't you be able to serve normal content as well as Zope content without rewriting the URL?

ijsman77 04-07-2004 02:25 AM

I got it working already, the rewriterule uses reverse proxy and that wasn't allowed yet :)


All times are GMT -5. The time now is 04:44 AM.