Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-20-2012, 11:31 AM   #1
LQ Newbie
Registered: Jan 2012
Posts: 14

Rep: Reputation: Disabled
Problem with virtual hosting

Just for testing, i want to create a random web page, but from a different local than one that i already have(and defined on /etc/apache2/sites-enabled/nameofthefile).

The problem is, i'm not sure how to do it.

basically i did something like this


#mkdir /home/username/public_dir

#vi /etc/apache2/sites-available/public


DocumentRoot /home/username/public_dir

<Directory /home/username/public_dir >

#vi /etc/network/interfaces

iface eth0:1 inet static

#ifup eth0:1

#a2ensite public

#service apache2 restart
After all this, when i type on the address bar of my web browser, i'm redirected to the localhost page(the one that says "it worked!") which i didn't want. I want to access the public_dir content

What should i do?

Thanks in advance
Old 02-20-2012, 11:58 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
I think this is roughly what you're trying to do?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix virtual hosting problem ddaas Linux - Server 1 12-24-2008 09:49 AM
Problem w/ outgoing mail using Sendmail virtual hosting dairyland Linux - Software 0 03-30-2005 08:33 AM
Virtual Hosting + Apache problem ysg08 Linux - Networking 2 01-18-2005 09:19 AM
virtual hosting problem Joe826 Linux - Networking 4 02-11-2004 01:46 AM
Problem with Apache virtual hosting tgelsinger Linux - Software 2 08-30-2003 11:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration