[SOLVED] Debian Apache2 Redirect or ProxyPass fails
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu, Fedora, CEntOS, Linux Mint, PCLinux, AntiX, others
Posts: 12
Rep:
Debian Apache2 Redirect or ProxyPass fails
Redmine is in its Bitnami world and running on its own webserver
at http://sub.example.org:8080/redmine
apache2 is running and presents a web site of its own at http://sub.example.org
example.org points to an entirely different machine.
These DNS "A" records are split out at the domain registrar.
Code:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Point / to redmine
# ----------------------------------------------------------
#Alias /redmine/ :8080/redmine/
#RedirectMatch 301 ^/redmine/$ :8080/redmine/
#ProxyPass /redmine :8080/redmine
#ProxyPassReverse /redmine :8080/redmine
#these inside a container failed entirely
</Directory>
# Point / to redmine
# ----------------------------------------------------------
#Alias / :8080/redmine/ # Fails because the actual baseurl
# is on a different box
#RedirectMatch 301 ^/$ :8080/redmine/
#ProxyPass http://HOSTNAME-01/redmine http://HOSTNAME-01:8080/redmine
#ProxyPassReverse http://HOSTNAME-01/redmine http://HOSTNAME-01:8080/redmine
# RedirectMatch and ProxyPass both gave me a proxy to
# http://sub.example.org/redmine/:8080/redmine/
# which is broken
Is there a better way to get a redirect to send sub.example.org/redmine to sub.example.org:8080/redmine? I might have to turn off the port 80 webserver entirely, then it would be an issue of putting an alias into the yaml file for redmine.
Are you sure it's not your browser cache? I guess you're restarting apache after making changes.
Quote:
I am putting this in the /etc/apache2/sites-available/default file
should I be putting it in the mod_proxy.conf file instead?
I'm not familiar with debian's apache config files, but I guess you need to put those directives in the sub.example.org vhost config (something like /etc/apache2/sites-enabled/<sub-example>), unless it's your default vhost.
Also try to put those directives outside of the <Directory ...></Directory> part.
Distribution: Ubuntu, Fedora, CEntOS, Linux Mint, PCLinux, AntiX, others
Posts: 12
Original Poster
Rep:
I went a different route, in the end.
I had discovered the ProxyPass directives failed inside a container
The end solution was
inside the vhost file but outside of a location container:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.