LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   multiple websites in LAMP (https://www.linuxquestions.org/questions/linux-newbie-8/multiple-websites-in-lamp-757291/)

anon091 09-23-2009 11:27 AM

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?

adm1329 09-23-2009 11:51 AM

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.

anon091 09-23-2009 11:53 AM

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

adm1329 09-23-2009 11:57 AM

Quote:

Originally Posted by rjo98 (Post 3694413)
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

anon091 09-23-2009 12:02 PM

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.

adm1329 09-23-2009 01:37 PM

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...

anon091 09-23-2009 01:43 PM

sounds easy enough, thanks!


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