Jago6060 Posted November 14, 2007 Share Posted November 14, 2007 here is my task IP=192.168.10.<#> www.<lastname>.org produces a page that says "Happy Holidays from <lastname>.org domain" and www.<lastname>.net produces a page that says "Happy Holidays from <lastname>.net domain". I'm not really sure how to go about doing this. I've heard from a few people that it would be done using iptables. Any help would be great. I'm doing this on Slackware 11 if it matters Quote Link to comment https://forums.phpfreaks.com/topic/77357-need-help-with-website-aliasing/ Share on other sites More sharing options...
steviewdr Posted November 15, 2007 Share Posted November 15, 2007 Apache's "Virtual Hosts" is what you need. Take a look at: http://wiki.kartbuilding.net/index.php/Apache_2_&_SSL_-_PHP4_-_MySQL_4.1 -steve Quote Link to comment https://forums.phpfreaks.com/topic/77357-need-help-with-website-aliasing/#findComment-392130 Share on other sites More sharing options...
Jago6060 Posted November 28, 2007 Author Share Posted November 28, 2007 I've tried everything I can possible imagine involving vurtual hosts and it still doesn't work. I still can't get it to grab 2 different index pages. I have in my hosts file the following 127.0.0.1 localhost 127.0.0.1 www.scribner.org 127.0.0.1 www.scribner.net 192.168.10.80 scribner.scribner.org scribnerand then in my httpd.conf NameVirtualHost 192.168.10.80 <VirtualHost 192.168.10.80> ServerName www.scribner.org DocumentRoot /www/scribner.org </VirtualHost> <VirtualHost 192.168.10.80> ServerName www.scribner.net DocumentRoot /www/scribner.net </VirtualHost>and in /var/www/ I have 2 directories, one is scribner.org and the other is scribner.net Within both of those directories I have an index.html file that I want to be accessed respectively, when you go to scribner.org and scribner.net I can't seem to find what's wrong with my execution. Any help would be great Quote Link to comment https://forums.phpfreaks.com/topic/77357-need-help-with-website-aliasing/#findComment-401569 Share on other sites More sharing options...
steviewdr Posted November 29, 2007 Share Posted November 29, 2007 Try this for your Virtual hosts config: #set the default server name ServerName scribner.net NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.scribner.net DocumentRoot /var/www/scribner.net/ ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/access.log combined ServerSignature On </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.scribner.org DocumentRoot /var/www/scribner.org/ ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/access.log combined ServerSignature On </VirtualHost> Go into "Command Prompt" or shell etc. and go "ping www.scribner.org" and "ping www.scribner.net" I hope this helps. Vhosts is definately what you need. Its much easier if you had an actual domain name and server on the external net. -steve Quote Link to comment https://forums.phpfreaks.com/topic/77357-need-help-with-website-aliasing/#findComment-401996 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.