![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Serving and Management how to web server support forum |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
|
multiple apache servers on one machine
i have a maching running a website already, however my dad and i are starting a car club that i want to make a site for, the site i have now is on port 8080, how could i make a different server on port say 8081 you can see the site thats now hosting on jakes58.hopto.org any ideas? thanks
|
|
|
|
|
|
#2 (permalink) |
|
Manager, Alternative Comp
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS
|
There's no need to run a seperate apache process if you want to have a second website. And I'm assuming you mean you're using port 80, not port 8080. To get Apache to serve more then 1 website, you need to edit the apache.conf file and add a second VirtualHost section at the very bottom of the config file. You'll need to edit the VirtualHost section accordingly however. If you need help with this, please let us know.
__________________
|
|
|
|
|
|
#3 (permalink) |
|
Manager, Design
|
Skie, I'ma fly you down to San Antonio so I can lern everything you know! To keep this thread going I'm gonna ask exactly how that modification is done. At present I have a single machine running Apache 2 and it hosts 3 sites. Right now I just use URL redirects to go to the directories that the data resides in. ex. http://199.199.199.1/ors http://199.199.199.1/KD http://199.199.199.1/ors/tws...
__________________
![]() ![]() ----------------------------- There are no dumb questions, unless a customer is asking them. Help in the fight against cancer and other serious illnesses.
|
|
|
|
|
|
#5 (permalink) |
|
Manager, Alternative Comp
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS
|
ebackhus, pay for my flight, hotel and my time, and I'll teach you.
![]() However, since you're doing directly by IP, it's not as simple. You can do something like "1.2.3.4/~username", but that's kind of ugly. Otherwise, you'll need to point 3 domains to your server if you want to do the VirtualHost method I describe below. warlocke, the reason I mentioned port 80 is because I assumed the domain you listed was where the site was located on your computer. Sorry for misunderstanding. Here's an example VirtualHost: Code:
<VirtualHost 1.2.3.4> ServerAlias example.com ServerAdmin webmaster@example.com DocumentRoot /home/username/public_html BytesLog domlogs/example.com-bytes_log ServerName www.example.com User username Group groupname CustomLog /usr/local/apache/domlogs/example.com combined ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/ </VirtualHost> The User and Group lines are the username and group for the user that will own these files. In my envorionment, since each user account has its own public_html within their home directory, I use that users username/group so that no 2 users have access to each others files. Obviously, there are other security issues to consider, but this is just one of the basic ideas to implement if this is a concern. If you're the only user, then this isn't as big of an issue. Set the CustomLog and BytesLog paths as appropriate for your environment if you wish to have log files that you can run through Awstats or Webalizer. The ScriptAlias line defines where the cgi-bin will be located so that any CGI scripts will be treated as such. This will also benefit from the User/Group lines. Keep in mind that every invironment is slightly different, so edit the above lines as appropriate for yours. Just copy/pasting those lines won't work otherwise. You can have as many VirtualHost blocks as needed. I've had several hundred without issues. If you have multiple IP's to use, you can define an IP for each VirtualHost. Also, for different ports, you can use the following: <VirtualHost 1.2.3.4:8080> Since you already have a site up and running, locate the existing VirtualHost and copy that block and modify it as needed.
__________________
Last edited by Skie : 01-10-2007 at 11:07 PM. |
|
|
|
|
|
#8 (permalink) |
|
Manager, Design
|
Generally this is located in the htdocs directory on Windows and *nix systems.
__________________
![]() ![]() ----------------------------- There are no dumb questions, unless a customer is asking them. Help in the fight against cancer and other serious illnesses.
|
|
|
|
|
|
#9 (permalink) |
|
Registered User
|
ok this is the url im using for what will be our car club site, notperfect.no-ip.org
i just downloaded a template and threw in the notperfect directory but it goes straight to the other site, i can access the notperfect but the vhost isnt redirecting it, let me open the other machine and log in here and ill post it. one second but this is what it should be pulling up http://notperfect.no-ip.org/notperfect Last edited by warlocke : 01-11-2007 at 10:52 AM. |
|
|
|
|
|
#10 (permalink) |
|
Registered User
|
ok this is my vhost block
i forgot to mention the apache server is running on windows server 2000 <VirtualHost 192.168.40.110> ServerAlias notperfect.no-ip.org ServerAdmin warlocke@kc.rr.com DocumentRoot E:\website\notperfect #BytesLog C:\Program Files\Apache Software Foundation\Apache2.2\logs\notperfect-bytes_log ServerName notperfect.no-ip.org #User chuck #Group groupname #CustomLog "C:\Program Files\Apache Software Foundation\Apache2.2\logs\notperfect" #ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/ </VirtualHost> |
|
|
|
|
|
#11 (permalink) | ||
|
Manager, Alternative Comp
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS
|
Quote:
Quote:
__________________
|
||
|
|
|
|
|
#14 (permalink) |
|
Registered User
|
<VirtualHost 192.168.40.110>
ServerAlias jakes58@hopto.org ServerAdmin warlocke@kc.rr.com DocumentRoot E:\website #BytesLog C:\Program Files\Apache Software Foundation\Apache2.2\logs\jakes58-bytes_log ServerName jakes58.hopto.org #User chuck #Group groupname #CustomLog "C:\Program Files\Apache Software Foundation\Apache2.2\logs\jakes58" #ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/ </VirtualHost> <VirtualHost 192.168.40.110> ServerAlias notperfect.no-ip.org ServerAdmin warlocke@kc.rr.com DocumentRoot E:\website\notperfect #BytesLog C:\Program Files\Apache Software Foundation\Apache2.2\logs\notperfect-bytes_log ServerName notperfect.no-ip.org #User chuck #Group groupname #CustomLog "C:\Program Files\Apache Software Foundation\Apache2.2\logs\notperfect" #ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/ </VirtualHost> |
|
|
|
|
|
#15 (permalink) |
|
Manager, Alternative Comp
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS
|
The first VHost is slightly wrong. The ServerAlias should not be an email address. I suggest changing that to no-ip.org or whatever you want it to be when someone visits that site.
__________________
|
|
|
|