Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.