# Apache2 as reverse proxy not working?

**URL:** <https://community.letsencrypt.org/t/apache2-as-reverse-proxy-not-working/54794>\
**Category:** Help\
**Created:** [March 4, 2018, 11:58pm UTC](https://community.letsencrypt.org/t/apache2-as-reverse-proxy-not-working/54794 "2018-03-04T23:58:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![am0awad](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/am0awad/32/20811_2.png) [@am0awad](https://community.letsencrypt.org/u/am0awad)\
**Post date:** [March 4, 2018, 11:58pm UTC](https://community.letsencrypt.org/t/apache2-as-reverse-proxy-not-working/54794/1 "2018-03-04T23:58:22Z")

</div>

Hello I am trying to setup apache2 as reverse proxy on Ubuntu.  
For the backed I have tomcat 7.  
For the configuration file /etc/apache2/sites-enabled/example.co.conf

```
<VirtualHost *:80>
        ServerName example.co
        ServerAlias *example.co
        ServerSignature Off

        RewriteEngine On
        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

        ErrorLog /var/log/apache2/redirect.error.log
        LogLevel debug
</VirtualHost>

<VirtualHost *:443>
        ServerName example.co
        ServerAlias *example.co
        ProxyPreserveHost On
        ProxyRequests off
        AllowEncodedSlashes NoDecode

    <Proxy *>
          Order deny,allow
          Allow from all

    </Proxy>

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/example.co/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf

        ProxyPass / http://localhost:8080/ nocanon
        ProxyPassReverse / http://localhost:8080/

        RequestHeader set X-Forwarded-Proto "https"
        RequestHeader set X-Forwarded-Port "443"

        LogLevel debug
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

```

I tried to check using:

```
$elinks https://localhost 

```

and it’s works but when I tried from outside not working.

Any Help!

---

<div class="post-metadata">

**Author:** ![am0awad](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/am0awad/32/20811_2.png) [@am0awad](https://community.letsencrypt.org/u/am0awad)\
**Post date:** [March 5, 2018, 12:10am UTC](https://community.letsencrypt.org/t/apache2-as-reverse-proxy-not-working/54794/2 "2018-03-05T00:10:07Z")

</div>

I noticed that I didn’t open 443 port on Amazon AWS. After I opened the port it’s work. this configuration works with me.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [April 4, 2018, 12:10am UTC](https://community.letsencrypt.org/t/apache2-as-reverse-proxy-not-working/54794/3 "2018-04-04T00:10:33Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
