Computing.Net > Forums > Web Development > Apache v-hosts on dynamic IP set-up

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Apache v-hosts on dynamic IP set-up

Reply to Message Icon

Name: fem
Date: August 26, 2004 at 01:57:37 Pacific
OS: Win2k/IBM Laptop
CPU/Ram: Pentium2 800/256
Comment:

I have a dynamic IP, router and 2 PCs. To currently serve two sites on the same name but different ports I have the following set-up: www.No-IP.com agent resides on one of the machines and updates DNS inn real time, router re-directs requests from ports 80 and 8080 to the respective PCs to serve the content. I want to move both sites on one machine. The issue is that Apache asks to specify IP address in the naming of the virtual host ... I can't do it. Is there a solution? Script ideas for conf file would be greatly appreciated. Oleg



Sponsored Link
Ads by Google

Response Number 1
Name: barelysane
Date: August 27, 2004 at 08:56:46 Pacific
Reply:

I have a dynamic IP address and used Apache with virtual hosts on different ports for a while but I can't remember entirely how I did it. However this fragment lingers in my conf file and may help...

NB: My server was running on an old compaq deskpro with only 128k of memory and it used to go off into a corner and sulk quite a lot when running virtual hosts which may or may not have been due to memory shortage - I've since gone to using two PC's instead partly because of that and partly because I find it easier to maintain.


# ServerName myserverone.com
# ServerAdmin admin@myserverone.com
# DocumentRoot "C:/xampp/htdocs"
#
# Listen 80
# Listen 8080
#
# Virtual Hosts
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#NameVirtualHost *:8080
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#

#<VirtualHost *:80>
# ServerName www.myserverone.com
# ServerAdmin admin@serverone.com
# DocumentRoot "/xampp/htdocs"
# ErrorLog logs/server1.com-error_log
# CustomLog logs/server1-access_log common
#</VirtualHost>

#<VirtualHost *:8080>
# ServerName myservertwo.co.uk
# ServerAdmin admin@myservertwo.co.uk
# DocumentRoot "/xampp/server2"
# ErrorLog logs/server2-error_log
# CustomLog logs/server2-access_log common
#</VirtualHost>


0

Response Number 2
Name: fem
Date: September 7, 2004 at 05:59:18 Pacific
Reply:

Thanks a lot. Not sure if it will work -- the first stab was not, bt thanks a lot for taking time to post your response. Well, does anyone know how to test virtual host configuation without going through restarts, etc. I'm not using your typical Apache, but Apache as a part of Reactor server (combined with PHP and MySQL).

Regards,
Oleg


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Apache v-hosts on dynamic IP set-up

Setting up apache server w/php+mysq www.computing.net/answers/webdevel/setting-up-apache-server-wphpmysq/2743.html

setting up IIS www.computing.net/answers/webdevel/setting-up-iis-/2984.html

setting up a FTP server www.computing.net/answers/webdevel/setting-up-a-ftp-server/733.html