LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-20-2012, 12:31 PM   #1
Durin
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

Quote:

#mkdir /home/username/public_dir

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

<VirtualHost 192.168.1.4:80>
##################

DocumentRoot /home/username/public_dir

<Directory /home/username/public_dir >


#vi /etc/network/interfaces

iface eth0:1 inet static
address 192.168.1.4
netmask 255.255.255.0
gateway 192.168.1.254


#ifup eth0:1


#a2ensite public

#service apache2 restart
After all this, when i type 192.168.1.4 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, 12:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I think this is roughly what you're trying to do?
http://articles.slicehost.com/2007/9...ts-permissions


Cheers,
Tink
 
  


Reply


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 10:49 AM
Problem w/ outgoing mail using Sendmail virtual hosting dairyland Linux - Software 0 03-30-2005 09:33 AM
Virtual Hosting + Apache problem ysg08 Linux - Networking 2 01-18-2005 10:19 AM
virtual hosting problem Joe826 Linux - Networking 4 02-11-2004 02:46 AM
Problem with Apache virtual hosting tgelsinger Linux - Software 2 08-30-2003 12:37 PM


All times are GMT -5. The time now is 08:38 PM.

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