# Ubuntu Apache Subdomain ProxyReverse Error

**URL:** <https://forums.rocket.chat/t/ubuntu-apache-subdomain-proxyreverse-error/10868>\
**Category:** Community Support\
**Created:** [April 5, 2021, 7:43pm UTC](https://forums.rocket.chat/t/ubuntu-apache-subdomain-proxyreverse-error/10868 "2021-04-05T19:43:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucianv](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@lucianv](https://forums.rocket.chat/u/lucianv)\
**Post date:** [April 5, 2021, 7:43pm UTC](https://forums.rocket.chat/t/ubuntu-apache-subdomain-proxyreverse-error/10868/1 "2021-04-05T19:43:54Z")

</div>

### Description

### Server Setup Information

- Version of Rocket.Chat Server:3.12.13
- Operating System: Ubuntu 20.04
- Deployment Method: manual
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: 12.18.4
- MongoDB Version: 4.0.23
- Proxy: apache
- Firewalls involved: none

### Any additional Information

Hi guys. Can somebody point me to the right direction?  
I’m new with rocketchat, but willing to learn.

1. I followed the manual installation on the rocketchat website
2. This is the content of my port 80 virtualhost  
\<VirtualHost \*:80\>  
DocumentRoot /var/www/html/chat.mydomain/  
ServerName chat.mydomain  
ServerAlias www.chat.mydomain

\<Directory /var/www/html/chat.mydomain/\>  
Options FollowSymlinks  
AllowOverride All  
Require all granted

ErrorLog {APACHE\_LOG\_DIR}/error.log CustomLog {APACHE\_LOG\_DIR}/access.log combined  
RewriteEngine on  
RewriteCond %{SERVER\_NAME} =chat.mydomain [OR]  
RewriteCond %{SERVER\_NAME} =www.chat.mydomain  
RewriteRule ^ https://%{SERVER\_NAME}%{REQUEST\_URI} [END,NE,R=permanent]

1. This is the content of my port 443 virtualhost  
  
\<VirtualHost _:443\>  
ServerName chat.mydomain  
LogLevel debug  
ErrorLog /var/log/chat.mydomain\_error.log  
TransferLog /var/log/chat.mydomain\_access.log_  
   
_Require all granted_  
   
_RewriteEngine On  
RewriteCond %{HTTP:Upgrade} =websocket [NC]  
RewriteRule /(._) ws://localhost:3000/$1 [P,L]  
RewriteCond %{HTTP:Upgrade} !=websocket [NC]  
RewriteRule /(.\*) [http://localhost:3000/$1](http://localhost:3000/%241) [P,L]

2. This is the content of my rocketchat service  
[Unit]  
Description=The Rocket.Chat server  
#After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service  
After=network.target remote-fs.target nss-lookup.target apache2.service mongod.service  
[Service]  
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js  
StandardOutput=syslog  
StandardError=syslog  
SyslogIdentifier=rocketchat  
User=rocketchat  
#Environment=MONGO\_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO\_OPLOG\_URL=mongodb://localhost:2701\>  
Environment=MONGO\_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01  
Environment=MONGO\_OPLOG\_URL=mongodb://localhost:27017/local?replicaSet=rs01  
Environment=ROOT\_URL=https://chat.mydomain/  
Environment=HTTP\_FORWARDED\_COUNT=1  
[Install]  
WantedBy=multi-user.target

3. This is the error I get from the page

# Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.  
Apache/2.4.41 (Ubuntu) Server at chat.mydomain Port 443

1. This is what I get in the log files  
 ![image](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/4/46f66dbddeb7626f973bc297561f1714cb5563e3.png)

My questions.  
1.There is a comment to include Environment=HTTP\_FORWARDED\_COUNT=1 in the rocketchat file for a proxy. I did that. Is that what the instructions want?  
2. In my virtualhost port 443 I have the Let’s Encrypt certificates. Notice that I do not have any intermediate one, but according to the logs this does not appear to be a problem. Or it is?  
3. The errors are toward the end of the logs and seems related to the proxy\_fcgi and proxy\_http.  
How should I go about solving them?

Thank you guys.
