LinuxQuestions.org
Register a domain and help support LQ
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, 12:27 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,674

Rep: Reputation: 47
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, 12:51 PM   #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, 12:53 PM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,674

Original Poster
Rep: Reputation: 47
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, 12:57 PM   #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, 01:02 PM   #5
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,674

Original Poster
Rep: Reputation: 47
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, 02: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 02:41 PM.
 
Old 09-23-2009, 02:43 PM   #7
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,674

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


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


All times are GMT -5. The time now is 01:24 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