LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-18-2004, 04:57 PM   #1
amdathlonboy
LQ Newbie
 
Registered: Jun 2004
Distribution: Mandrake
Posts: 7

Rep: Reputation: 0
VirtualHosts


Hi everyone,

I have gotten my VirtualHosts in Apache to work for other domain names. What I want to know now is, if I can set up a Virtual host to go to the same domain as another one, but still work?

For example:

I have a virtualhost setup for www . miracletechnologiesonline . com - It is set to look for an index file in /var/www/html
What I want to know now is, can I set one up so that, instead of www . miracletechnologiesonline . com/newfolder looking for an index file in the directory that www . miracletechnologiesonline . com is set up to look into like:
/var/www/html/newfolder, can I set it up so that it looks in someones home directory instead? Like /home/newfoler/www?

the reason I am asking is because I want to setup a website for a customer and set it up so that when the customer uploads an index file on my FTP, to their home directory, Apache looks in that directory to load the web site.

Thanks
AMD
 
Old 06-18-2004, 05:17 PM   #2
mchanea
LQ Newbie
 
Registered: Jan 2004
Location: Rio de Janeiro - Brasil
Distribution: debian/rh
Posts: 18

Rep: Reputation: 0
As far as I know, you have to specify the path on the Document Root parameter into the Virtual Host configuration.

Ex.:

<VirtualHost IP#>
DocumentRoot /home/user/www
etc......
</VirtualHost>


Hope this helps.
 
Old 06-18-2004, 05:28 PM   #3
amdathlonboy
LQ Newbie
 
Registered: Jun 2004
Distribution: Mandrake
Posts: 7

Original Poster
Rep: Reputation: 0
<VirtualHost IP#>
ServerName www . miracletechnologiesonline . com/newfolder
DocumentRoot /home/user/www
</VirtualHost>

would that work? Or do I need to do something else?

Thanks for the help
 
Old 06-19-2004, 02:32 PM   #4
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
Re: VirtualHosts

Quote:
Originally posted by amdathlonboy
Hi everyone,

I have gotten my VirtualHosts in Apache to work for other domain names. What I want to know now is, if I can set up a Virtual host to go to the same domain as another one, but still work?

For example:

I have a virtualhost setup for www . miracletechnologiesonline . com - It is set to look for an index file in /var/www/html
What I want to know now is, can I set one up so that, instead of www . miracletechnologiesonline . com/newfolder looking for an index file in the directory that www . miracletechnologiesonline . com is set up to look into like:
/var/www/html/newfolder, can I set it up so that it looks in someones home directory instead? Like /home/newfoler/www?

the reason I am asking is because I want to setup a website for a customer and set it up so that when the customer uploads an index file on my FTP, to their home directory, Apache looks in that directory to load the web site.

Thanks
AMD

Add an "Alias" directive for your "newfolder" to point to your new directory.
 
Old 06-21-2004, 12:38 PM   #5
amdathlonboy
LQ Newbie
 
Registered: Jun 2004
Distribution: Mandrake
Posts: 7

Original Poster
Rep: Reputation: 0
Hi there,

Forgive me, I am kind of a newb at Apache, how do I
Add an "Alias" directive for your "newfolder" to point to your new directory?

Thanks.
 
Old 06-21-2004, 01:07 PM   #6
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
amdathlonboy

Good place to read mod_alias
 
Old 06-21-2004, 01:59 PM   #7
amdathlonboy
LQ Newbie
 
Registered: Jun 2004
Distribution: Mandrake
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks very much for the help, it working perfectly now!
 
  


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
Apache VirtualHosts and VSFTPd critical Linux - Software 3 09-14-2005 02:12 PM
NameVirtualHost IP# has no VirtualHosts? DigiCrime Linux - Networking 2 10-11-2004 12:24 AM
Adding multiple VirtualHosts ecroswell Linux - Networking 3 03-14-2003 07:26 AM
Squirrelmail and VirtualHosts micaheli Linux - Networking 6 12-27-2002 01:00 PM
Virtualhosts + firewall Syncrm Linux - Networking 9 05-21-2002 10:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:42 AM.

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