Jump to content

need help with website aliasing


Jago6060

Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/77357-need-help-with-website-aliasing/
Share on other sites

  • 2 weeks later...

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.