1

I use on my home server, Apache with one main application that is OwnCloud. So to access it from Internet I use URL ->

https://my_host.no-ip.org/owncloud

I use another HTTP application on the same server. This application has its own HTTP server and it does not use Apache. So at this time it use 8080 and 8081 as HTTP/HTTPS ports. The problem is to access to the second app, when I am for example in hotel (with WiFi service) but behind proxy server. Such servers in 90% proxies only ports 80 and 443 and no other, including SOCS. Because I have only one IP address supply by my ISP I can not split access to two different IP address. So my question is. Is there any way to access my second app using URL:

https://my_host.no-ip.org

And access owncloud via URL:

https://my_host.no-ip.org/owncloud

Both on standard port 443. At this time, the firs URL is only redirection to another WEB site located somewhere in Internet, unnecessary for me.

Any idea? Is it possible at all?

  • Does your ISP offer you the use of sub domains? I run an OwnCloud instance for our company on a subdomain and it works great. This might allow you to bind one server to a sub-domain and the other to the main domain. – datUser May 15 '14 at 20:25
  • The problem is that I use NOIP as a DNS service (free account) limited in its functionality. So domain name is not supply by my ISP. On the other hand, my ISP change my IP address everyday, about 8:30 AM. And subdomains are part of extended (payed) NOIP account. I dont want to pay for my private usage, if possible. – mackowiakp May 16 '14 at 5:35
  • In that case sim's answers are probably your best route to take. – datUser May 16 '14 at 12:54
2

If you continue to run the 2nd Apache server on ports 8080 and 8081 you can do any of the following:

  1. Setup a reverse proxy using the 1st server on port 80 which will forward any traffic that comes into https://my_host.no-ip.org/owncloud.
  2. Do a 301 forward for any traffic that comes into https://my_host.no-ip.org/owncloud to https://my_host.no-ip.org:8081/.
  3. Do a URL rewrite of https://my_host.no-ip.org/owncloud to https://my_host.no-ip.org:8081/owncloud.

Of these options I would use #1. Details on how to do this are in this article titled: Configure Apache HTTPd as a reverse proxy (mod_proxy).

General steps

  1. Open the httpd.conf located in the <httpd_home>/conf directory.
  2. Look for the following LoadModule directives and uncomment them by removing the # at the beginning of the line.

    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    
  3. At the bottom of the httpd.conf add the following lines to enable the re-routing.

    ProxyPass /console http://localhost:8080/console
    ProxyPass /images http://localhost:8080/images
    ProxyPassreverse / http://localhost:8080/
    
  • The problem is, that the second app is not Apache based. It is "stand-alone" app written in Java. It uses HTTP mechanisms but it is not "real" HTTP app. I can change the ports it is working on, but practically nothing more. So I can change configuration of Apache server only for the first app (OwnCloud) – mackowiakp May 16 '14 at 6:10
  • @user180586 - that should still be OK. You can reverse proxy on Apache, and point to the 2nd app on whatever ports it's on. – slm May 16 '14 at 6:14
  • OK. I Will try ! – mackowiakp May 16 '14 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.