vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 wrote: > My question is just How? > Where can I get the current IP of my internet connection (eth0) .... '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. |
| |||
| Kejpa <kejpa@netscape.net> wrote: > 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? 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 |
| |||
| On Sat, 18 Oct 2003 12:38:52 +0300, Kejpa <kejpa@netscape.net> wrote: > 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? 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/ |
| |||
| 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: > Kejpa wrote: > > >>My question is just How? >>Where can I get the current IP of my internet connection (eth0) > > > ... 'programmatically'?? via a CLI? maybe start at "man ifconfig" > . |
| |||
| David Efflandt wrote: > You can use wildcard NameVirtualHost * and <VirtualHost *> sections for > http, but I doubt if it would work for https. 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 |
| |||
| In article <3F92813F.6040700@netscape.net>, Kejpa wrote: > > David Efflandt wrote: >> You can use wildcard NameVirtualHost * and <VirtualHost *> sections for >> http, but I doubt if it would work for https. > > Yeah, you're right. It won't work, that's why I'd like to get the > current IP into the conf file. > 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 > 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 > > |
| ||||
| John Doe wrote: > Are you asking how to *redirect*? 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. > for example: > ifconfig | grep 'inet\ addr' > somefile 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 |