Professional Web Applications Themes

https and Dynamic IP - Linux Setup, Configuration & Administration

Hi, I have some problems configuring an Apache2 webserver to use https and support multiple virtual servers. From what I've understand you need to have at least one entry for NameVirtualHost but as I have a dynamic IP from my ISP I can't set it. I've read that you can use variables with Apache2, and so I thought I'd get the current IP from somewhere and use it in the conf file. My question is just How? Where can I get the current IP of my internet connection (eth0) and how can I use it in the httpd.conf file? Thanx ...

  1. #1

    Default https and Dynamic IP

    Hi,
    I have some problems configuring an Apache2 webserver to use https and
    support multiple virtual servers.
    From what I've understand you need to have at least one entry for
    NameVirtualHost but as I have a dynamic IP from my ISP I can't set it.
    I've read that you can use variables with Apache2, and so I thought I'd
    get the current IP from somewhere and use it in the conf file.

    My question is just How?
    Where can I get the current IP of my internet connection (eth0) and how
    can I use it in the httpd.conf file?

    Thanx
    /Kejpa

    Kejpa Guest

  2. #2

    Default Re: https and Dynamic IP

    Kejpa wrote:
     

    .... 'programmatically'?? via a CLI? maybe start at "man ifconfig"
    ..
    --
    /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\
    \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
    There was a young lady from Hyde
    Who ate a green apple and died.
    While her lover lamented
    The apple fermented
    And made cider inside her inside.

    mjt Guest

  3. #3

    Default Re: https and Dynamic IP

    Kejpa <net> wrote: 
     

    You can get it from /sbin/ifconfig. However you need a IP for each!
    https host, using catch all certs and alike completely defeats the
    purpose of https, which relies among others on a reverse DNS lookup,
    making dynamic IP mostly useless.

    --
    Michael Heiming

    Remove +SIGNS and www. if you expect an answer, sorry for
    inconvenience, but I get tons of SPAM
    Michael Guest

  4. #4

    Default Re: https and Dynamic IP

    On Sat, 18 Oct 2003 12:38:52 +0300, Kejpa <net> wrote: 

    You can use wildcard NameVirtualHost * and <VirtualHost *> sections for
    http, but I doubt if it would work for https.

    --
    David Efflandt - All spam ignored http://www.de-srv.com/
    http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
    http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
    David Guest

  5. #5

    Default Re: https and Dynamic IP

    Hey,
    I am a newby, I plea guilty of that. But getting the IP address from
    ifconfig eth0 is familiar too me.
    My question is howto get the information presented there into my
    httpd.conf file.
    I'm sure you can do it with some fancy regexp in combination with grep.

    The other question is more of a "is it possible", can I use the result
    from this in my conf file, and how?

    Thank for your effort.
    /Kejpa

    mjt wrote: 
    >
    >
    > ... 'programmatically'?? via a CLI? maybe start at "man ifconfig"
    > .[/ref]

    Kejpa Guest

  6. #6

    Default Re: https and Dynamic IP


    David Efflandt wrote: 

    Yeah, you're right. It won't work, that's why I'd like to get the
    current IP into the conf file.

    I can get the IP from ifconfig eth0 but there's a lot of rubbish there
    too that I need to get rid of. Some fancy regexp in combination with
    grep is my guess, but I'm not even close on having it working.
    And another issue is how to use the result in the httpd.conf file.

    Thanx for your effort
    /Kejpa


    Kejpa Guest

  7. #7

    Default Re: https and Dynamic IP

    In article <net>, Kejpa wrote: 
    >
    > Yeah, you're right. It won't work, that's why I'd like to get the
    > current IP into the conf file.
    >[/ref]

    Are you asking how to *redirect*?

    for example:
    ifconfig | grep 'inet\ addr' > somefile

    This doesn't exactly work, however, b/c you are interested in extracting
    only the IP addr of eth0, so you would need to modify command.

    I'm pretty sure you would need to use 'sed' to extract the IP address
    and you might have to use some fancy way of inserting it exactly where
    you want into your .conf file.

    -jd

     
    John Guest

  8. #8

    Default Re: https and Dynamic IP



    John Doe wrote: 
    No, I'd like to have some (or at least one) secure site(s) on my
    Linux-box where I can access webmail and other stuff that I need to log
    on in order to get. Sending the password without any encryption isn't my
    idea of secure computing.
     
    I've thought about doing it this way in the conf file:
    ---snip-----
    SetEnvMyIP 213.204.63.63 #( get from system )

    NameVirtualHost env=myIP
    <VirtualHost 192.168.0.1 env=MyIP>
    ---snip-----

    What do you all think? Will it work?

    Comments, plz!
    /Kejpa

    Kejpa Guest

Similar Threads

  1. Replies: 1
    Last Post: December 30th, 06:21 AM
  2. dynamic drop downlists in an editable dynamic datagrid.
    By mkhans@gmail.com in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: June 22nd, 09:01 PM
  3. dynamic menu system going to dynamic page
    By Moragreid in forum Dreamweaver AppDev
    Replies: 3
    Last Post: April 4th, 08:19 PM
  4. DYNAMIC Dropdown. How to stick on non dynamic choice?
    By Lesley G in forum Dreamweaver AppDev
    Replies: 3
    Last Post: February 23rd, 05:49 PM
  5. PHP HTTPS POST Como hacer un POST https con PHP
    By Ing. Angel León in forum PHP Development
    Replies: 0
    Last Post: September 5th, 03:45 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139