MottS Posted June 14, 2003 Report Share Posted June 14, 2003 Hi all I have gd.no-ip.com and agtobs.no-ip.com pointing to my dynamic IP no problem with their IP-updater (little program...). Now, how do I configure Apache so that when one type a certain dns he get redirected to the right directory? Here is what I have so far. gd.no-ip.com is in /var/www/html and everything works well. I added a directory called agtobs in /var/www/html this way root@localhost vhosts]# ls /var/www/html/ addon-modules/ apache_pb.gif History/ MDKlinux.jpg Uptime.png agtobs/ Buggy/ index.html msfree.png WelcomeBonjour.png Air Cargo/ caffeine.gif MDKLinux/ Tux.png I also have Include conf/vhosts/Vhosts.conf in /etc/httpd/conf/httpd.conf. How do I set Vhosts.conf now? I've seen Paul writing the following at http://www.mandrakeusers.org/viewtopic.php...=apache+virtual NameVirtualHost 202.27.218.97 <VirtualHost 202.27.218.97> DocumentRoot /var/www/html/loudas.com ServerName loudas.com ServerAlias www.loudas.com CustomLog logs/loudas.com-access_log combined </VirtualHost> But my IP changes! .. so would it work writing NameVirtualHost agtobs.no-ip.com <VirtualHost agtobs.no-ip.com> DocumentRoot /var/www/html/agtobs ServerName agtobs ServerAlias agtobs.no-ip.com CustomLog logs/agtobs-access_log combined </VirtualHost> Otherwise I have no idea.. Thx for help MOttS Quote Link to comment Share on other sites More sharing options...
aru Posted June 15, 2003 Report Share Posted June 15, 2003 I use no-ip too in dialup. I have serveral hostnames and the same IP (which is dynamic). This is what works for me (Vhosts.conf): NameVirtualHost * <VirtualHost *> DocumentRoot /home/httpd/public_html/ ServerName server1.no-ip.org ServerAdmin admin@server1.no-ip.org </VirtualHost> <VirtualHost *> DocumentRoot /home/someuser/public_html/ ServerName server2.no-ip.org ServerAdmin admin@server2.no-ip.org </VirtualHost> <VirtualHost *> DocumentRoot /home/anotheruser/html/ ServerName server3.no-ip.org ServerAdmin admin@server3.no-ip.org </VirtualHost> and so on, make an entry for each one of the virtual servers you have. Ofcourse I have other local servers (non internet published, just for the LAN), and those entries look like: <VirtualHost 192.168.0.13> DocumentRoot /path/to/root/ ServerName lan_server.org ServerAdmin myself@mymachine </VirtualHost> HTH btw, no-ip rocks ;) Quote Link to comment Share on other sites More sharing options...
MottS Posted June 17, 2003 Author Report Share Posted June 17, 2003 Hey thanks ARU. That was exactly this (the *). Thanks! MOttS Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.