| 
 
 
 | 
| Keep Server Online 
 If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
 
 or
 
 
   
 A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
 
 Thank You! Steffen
 
 Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
 |  | 
 | 
| | 
| | 
|  Topic: subdomain refusing to point to docker image |  |  
| Author |  |  
| okebaja 
 
 
 Joined: 24 Aug 2018
 Posts: 1
 Location: Netherlands, Rotterdam
 
 | 
|  Posted: Fri 24 Aug '18 23:33    Post subject: subdomain refusing to point to docker image |   |  
| 
 |  
| I have a vps hosting two subdomains: cloud.example.com and office.example.com. On cloud I am hosting Nextcloud, on office I would like to host collabora/code (libre office online). I have all running on Ubuntu 16.04 and Apache 2.4. 
 First I had set up both subdomains using two conf files both declaring the virtual host, with servername, document root and ssl configuration (let's encrypt certs through certbot) and it worked: subdomain cloud is hosting nextcloud without problems, and subdomain office is showing the dummy page that I placed in the document root.
 
 Then I installed Libreoffice in a docker container, and changed the office conf file to point it to the docker contained using proxy directives. This is not working: for some reason, apache decides to point to /var/www/html showing digital ocean's default dummy page. This is very strange, because the /var/www/html path is not mentioned in any conf file.
 
 working config cloud.example.conf (recap):
 
  	  | Code: |  	  | ServerName cloud.example.com ServerAlias cloud.example.com
 DocumentRoot /var/www/nextcloud
 | 
 
 working config office.example.conf (recap):
 
  	  | Code: |  	  | ServerName office.example.com ServerAlias office.example.com
 DocumentRoot /var/www/office
 | 
 
 DocumentRoot is not set in any other conf file (as far as I was able to check; not in apache2.conf, ssl.conf and some others).
 
 changed config office.example.conf (recap) which is not working:
 
  	  | Code: |  	  | ServerName office.example.com #ServerAlias office.example.com
 #DocumentRoot /var/www/office
 ....
 # Container uses a unique non-signed certificate
 SSLProxyEngine On
 SSLProxyVerify None
 SSLProxyCheckPeerCN Off
 SSLProxyCheckPeerName Off
 # keep the host
 ProxyPreserveHost On
 # static html, js, images, etc. served from loolwsd
 # loleaflet is the client part of LibreOffice Online
 ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
 ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet
 # WOPI discovery URL
 ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
 ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery
 # Main websocket
 ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon
 # Admin Console websocket
 ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws
 # Download as, Fullscreen presentation and Image upload operations
 ProxyPass /lool https://127.0.0.1:9980/lool
 ProxyPassReverse /lool https://127.0.0.1:9980/lool
 | 
 
 What am I doing wrong, what am I missing?
 Why is Apache not directing office.example.com to the docker image running on 127.0.0.1:9980 using the proxy directives, but instead to /var/www/html ?
 
 The docker image is active and running. I am posting here since I suspect this to be an Apache configuration problem, since it is directing differently and not showing errors.
 
 All help appreciated !
 |  |  
| Back to top |  |  
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Thu 02 May '19 16:11    Post subject: |   |  
| 
 |  
| can you open the correct page on the internal URL with a browser like lynx? |  |  
| Back to top |  |  
 
 | 
 |  | 
 |  |