LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-23-2009, 11:27 AM   #1
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Rep: Reputation: 49
multiple websites in LAMP


Is it possible to run multiple websites in LAMP all over port 80, or do you have to do some customizing for multiple sites?
 
Old 09-23-2009, 11:51 AM   #2
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
There are different ways you can run Virtual Hosts in apache. You can do an IP based virtual host or a name based virtual host. I don't have an example file available right now and it's been a while since I've set up a web server, but you should be able to google apache virtual host and find plenty of documentation.
 
Old 09-23-2009, 11:53 AM   #3
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Cool, thanks. I didn't even know what to search for for that. I'd love for them all to be the same http://ip/DifferentNames
 
Old 09-23-2009, 11:57 AM   #4
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
Quote:
Originally Posted by rjo98 View Post
Cool, thanks. I didn't even know what to search for for that. I'd love for them all to be the same http://ip/DifferentNames
then you want name based virtual hosting, it uses the same ip but allows you to host multiple domains
 
Old 09-23-2009, 12:02 PM   #5
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
OK, thanks. What I'm trying to do is just have my one server host a bunch of very small websites, so it'll be easier for everyone to remember one IP address then slash then whatever site they need to use.
 
Old 09-23-2009, 01:37 PM   #6
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
In that case you don't need to do any virtual hosting. All you need to do is create the directories in your docroot /var/www/html in RedHat based systems.

So if I have /var/www/html/site1, /var/www/html/site2, and /var/www/html/site3 and my servers ip address is 192.169.1.1 and I go to http://192.168.1.1/site1 I get anything in the site1 folder, 192.168.1.1/site2 gives files in the site2 folder, etc...

Last edited by adm1329; 09-23-2009 at 01:41 PM.
 
Old 09-23-2009, 01:43 PM   #7
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
sounds easy enough, thanks!
 
  


Reply



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
One server, multiple domains/websites. jef3189 Linux - Server 4 04-04-2009 11:21 PM
how to enable in LAMP multiple website user? RMLinux Linux - Newbie 2 12-02-2008 03:38 AM
Multiple Websites - 1 server metallica1973 Linux - Server 8 06-16-2008 11:18 AM
multiple file upload for websites? sohmc Linux - Networking 4 02-23-2005 07:43 AM
How to configure multiple websites on one PC? <Ol>Origy Linux - Networking 8 08-16-2004 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:23 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
Open Source Consulting | Domain Registration