Apache Proxypass + SSL Port

Discussion in 'Server Operation' started by gabriellai, Jun 2, 2009.

  1. gabriellai

    gabriellai New Member


    I'm trying to configure a connection from apache server to backend server. scenario is as below:

    User request for HTTPS --> Apache HTTPS --> Proxypass to --> backend server at http://localhost:8000 --> then return back to user

    I tried proxypass and proxypassreverse on HTTPS connection, it don't work at all, but it works on Port 80.

    Please advise.
  2. tukangnggame

    tukangnggame New Member

    please tell me about your proxy reverse/proxypass configuration
  3. gabriellai

    gabriellai New Member

    I manage to get it works. will share the config later on :)
  4. tukangnggame

    tukangnggame New Member

    I will check your configuration only. OK.
    My be you can try to enable https server both (main server and backend server). Put proxyreverse configuration to your https server configuration.
  5. gabriellai

    gabriellai New Member

    this is what I have in my ssl.conf

    Redirect / https://real-domain/console
    ProxyPreserveHost on
    ProxyPass /console https://backend:<port>/console
    ProxyPassReverse /console https://backend:<port>/console

    I've forgotten that SSL Configurations should be put inside ssl.conf and not httpd.conf.

    That was where the error came from, once putting into ssl.conf, everything solves.

    Now i'm cracking my head on how to make HTTPS listen to one IP only, but with several domain names, any idea?
    Last edited: Jun 3, 2009
  6. tukangnggame

    tukangnggame New Member

    maybe you can use virtual host
    <VirtualHost *>
            ServerAdmin [email protected]
            ServerName "www.mydomain.com"
            ServerAlias "mydomain.com"
            DocumentRoot /var/www/mydomain
            <Directory /var/www/mydomain>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    Order allow,deny
                    allow from all
  7. gabriellai

    gabriellai New Member

    ya i got it... can we use VirtualHost for multiple HTTPS VirtualHost with a single IP Address? I'm using VirtualHost for this as well, just do not have any idea whether can I host multiple VirtualHost in HTTPS with a single IP address?
  8. tukangnggame

    tukangnggame New Member

    of course.
  9. gabriellai

    gabriellai New Member

    Wow cool.... I'll test it out :)

Share This Page