Apache2 reverse proxy not working on Ubuntu 20.04
NickName:eastwater Ask DateTime:2022-10-05T05:08:55

Apache2 reverse proxy not working on Ubuntu 20.04

Apache2 reverse proxy not working on Ubuntu 20.04.

sudo a2enmod proxy proxy_http proxy_balancer lbmethod_byrequests

Replaced sites-available/000-default.conf (only one enabled) as the following

<VirtualHost *:8080>
    ProxyPreserveHost On

    ErrorLog ${APACHE_LOG_DIR}/myproxy_error.log
    CustomLog ${APACHE_LOG_DIR}/myproxy_access.log combined

    ProxyPass / http://127.0.0.1:8081/
    ProxyPassReverse / http://127.0.0.1:8081/
</VirtualHost>

Restart

sudo systemctl restart apache2

http://domain:8080

It still loads the apache default page, not proxy to http://127.0.0.1:8081/.

wget http://127.0.0.1:8081/

works.

No errors found in the logs.

$apache2 -v
Server version: Apache/2.4.41 (Ubuntu)
Server built:   2022-06-14T13:30:55

Copyright Notice:Content Author:「eastwater」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/73953662/apache2-reverse-proxy-not-working-on-ubuntu-20-04

More about “Apache2 reverse proxy not working on Ubuntu 20.04” related questions

Apache2 reverse proxy not working on Ubuntu 20.04

Apache2 reverse proxy not working on Ubuntu 20.04. sudo a2enmod proxy proxy_http proxy_balancer lbmethod_byrequests Replaced sites-available/000-default.conf (only one enabled) as the following &lt;

Show Detail

Apache2 H10292 Invalid proxy UDS filename error after automatic update (Ubuntu 20.04)

This morning Apache2 was automaticaly updated on my Ubuntu 20.04 server: Start-Date: 2021-09-28 06:37:07 Commandline: /usr/bin/unattended-upgrade Upgrade: apache2-data:arm64 (2.4.41-4ubuntu3.3, 2....

Show Detail

Apache2 reverse proxy to a nextcloud server does not work

I've made a Ubuntu 18.04 Reverse Proxy Server with Apache2 and it works. I can reverse proxy to another apache2 webserver with no problem. But now I want to do the exact same thing to a nextcloud ...

Show Detail

Sonarqube Apache2 Reverse Proxy configuration

I am trying to set up SonarQube behind an Apache2 reverse proxy. Getting a 404 when i hit http://server/sonar. Server is running Ubuntu 16.04 My configuration in /etc/apache2/sites-enabled/sonar...

Show Detail

Nginx is not working as reverse proxy for .net core 6 web API deployed on Ubuntu 20.04

I am following MSDN tutorial for deploying .net core 6 app on Ubuntu 20.04 server with nginx as reverse proxy. App is working fine locally in the server I am getting the response; but when I run ht...

Show Detail

502 Error with Apache2 reverse proxy on Ubuntu 14.04

I'm trying to set up a reverse proxy with an Apache2 server accepting requests at port 443 (to enable https). The idea is to have the Apache2 server accept the request and forward it on to my Node ...

Show Detail

How to migrate a React app with multiple Node processes from http to secure https with Ubuntu Apache2

I have a React app and two Node Express (REST API) processes running under http (Apache2) on a DigitalOcean Ubuntu 20.04 Droplet. The React app runs on port 80 while the Node Express apps run on p...

Show Detail

Nginx reverse proxy to Apache2 - not working - too many redirects

at the beginning, I want to apologize, but I am a newbie with Nginx. I have a VPS where I have some PHP/Symfony projects (hosted in Apache2). Now I need to add a new application (in Vue especially ...

Show Detail

Apache2 Ubuntu default page after reverse proxy on example.com instead of Odoo website

How are you? When I config reverse proxy for the website Odoo works for www.example.com, but not for example.com and then it shows apache2ubuntu default page. The .conf file: &lt;VirtualHost *:80&gt;

Show Detail

node app not displaying through apache2 reverse proxy

I'm just getting started with meteor and I've deployed the sample todos app to my server which runs apache2 webserver. The meteor app runs fine through domain.com:3000 but when I use the URL domai...

Show Detail