Results 1 to 6 of 6

Thread: SSL and Apache http - https

  1. #1

    Default SSL and Apache http - https

    Morning, I got my app deployed and the relevant SSL keys all working, nice job. just wondering how I would go about forcing all http connections to go to https.

    I can see the apache directives box, but wondering what i can put in there on one line that will work, or can they be seperated out with a ;?

    Cheers

    Andy

  2. #2

    Default

    If you're using Apache HTTP Server, you can use the RewriteRule directive:

    Code:
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://myhostname/$1 [L,R=301]
    This will cause an HTTP 301 redirect to HTTPS.

    See here for more information.

  3. #3

    Default

    ok, so i get that bit, looks sensible, the question was more specificially how do i use the cloud foundry UI to enter multiline additions to the http.conf file?

  4. #4
    Join Date
    Sep 2010
    Posts
    5

    Default Disabling HTTP access

    I'm trying to disable HTTP access to my application and only allow HTTPS access. I tried to use the RewriteRule as suggested but it doesn't have an effect. I have an elastic IP address for my instance and have a godaddy security certificate. I'm using tcServer. Any advice would be appreciated. I've also tried:
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

  5. #5

    Default

    I'm trying to disable HTTP access to my application
    Do you want to simply disable the HTTP service and use only the HTTPS service, or do you want to keep port 80 available so it can redirect to 443?

  6. #6
    Join Date
    Sep 2010
    Posts
    5

    Default

    Ideally a redirect. But would be happy with simply disabling.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •