Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to redirect some folder within apache2.

My webserver uses with plesk 11.

I followed this tutorial. It says I've got to put redirection rules in this file /etc/apache2/sites-available/default. For my webserver this file doesn't even exist. I guess that's because of plesk's website management. However there is only this one file: 000-default. I did not modify it!

I also managed to locate the config file for my domain. Which is located here

/var/www/vhosts/example.org/conf/last_httpd.include

I want to solve my problem with Apache 2 "ProxyPass". Because I think that's the easiest way to solve the redirect.

As I found out, I have to add this line

ProxyPass /folder/map/ http://www.google.de

This does not work. It exits with error "403 forbidden". Please give me a hint. Thank you!

share|improve this question
    
I really don't see in the given config anything about how to open example.org/mc/map URL. It handles /mc/map/up, /mc/map/standalone and /mc/map/tiles, but not /mc/map.Probably you need to remove temporarily this config and check example.org/mc/map again –  Sergey L Feb 20 '13 at 4:31
    
@SergeyL You are right. I checked this. I think their tutorial is just wrong. So I edited my post. –  Peter I Feb 24 '13 at 16:39
add comment

1 Answer

up vote 0 down vote accepted

Works for Plesk 10/11:

1. Create your individual config for apache2

cd /var/www/vhosts/example.org
sudo touch conf/vhost.conf
sudo vim 

2. Insert your directives there

Press I and insert those lines

RewriteEngine On
ProxyPass /directory/subdir/ http://localhost:8123/
ProxyPassReverse /directory/subdir/ http://localhost:8123/

Press Esc followed by : and write: wq and press

3. Tell apache to use the config

sudo /usr/local/psa/admin/bin/httpdmng --reconfigure-all
sudo service apache2 restart

4. You are done.

Sources:
oli.new-lan.de
forum.parallels.com

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.