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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > Design Forum > Web Serving and Management
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Web Serving and Management how to web server support forum

Reply
 
Thread Tools
Old 01-10-2007, 12:11 AM   #1 (permalink)
Registered User
 
Join Date: Apr 2006
Location: lees summit, missouri
Posts: 146
OS: xp pro sp2


Send a message via MSN to warlocke
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
warlocke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-10-2007, 09:33 AM   #2 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS

My System

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.
__________________
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-10-2007, 11:11 AM   #3 (permalink)
Manager, Design
 
ebackhus's Avatar
 
Join Date: Apr 2005
Location: SATX
Posts: 12,767
OS: WinXP Pro SP3

My System

Blog Entries: 25
Send a message via ICQ to ebackhus Send a message via AIM to ebackhus Send a message via MSN to ebackhus Send a message via Yahoo to ebackhus Send a message via Skype™ to ebackhus
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.

ebackhus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-10-2007, 11:40 AM   #4 (permalink)
Registered User
 
Join Date: Apr 2006
Location: lees summit, missouri
Posts: 146
OS: xp pro sp2


Send a message via MSN to warlocke
no i mean 8080, when i had it on 80 no one could access it from outside, i think isp is blocking servers from that port,

and could you let me know how this is done
warlocke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-10-2007, 11:02 PM   #5 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS

My System

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>
For each domain that you wish to host, you'll need the above block of config lines. The first line where the 1.2.3.4 is located, that's your IP address. It can be the same for each block of lines. Everywhere that I have "example.com", put the domain name that you're defining. The DocumentRoot line is where you specify where the HTML/PHP files are located for that domain name. Please use the proper path for your environment.

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.
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-10-2007, 11:57 PM   #6 (permalink)
Registered User
 
Join Date: Apr 2006
Location: lees summit, missouri
Posts: 146
OS: xp pro sp2


Send a message via MSN to warlocke
and where do i put this?
warlocke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-11-2007, 12:03 AM   #7 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS

My System

This would go in your httpd.conf file. I'm not sure where it's located on your system.
__________________
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-11-2007, 08:35 AM   #8 (permalink)
Manager, Design
 
ebackhus's Avatar
 
Join Date: Apr 2005
Location: SATX
Posts: 12,767
OS: WinXP Pro SP3

My System

Blog Entries: 25
Send a message via ICQ to ebackhus Send a message via AIM to ebackhus Send a message via MSN to ebackhus Send a message via Yahoo to ebackhus Send a message via Skype™ to ebackhus
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.

ebackhus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-11-2007, 10:46 AM   #9 (permalink)
Registered User
 
Join Date: Apr 2006
Location: lees summit, missouri
Posts: 146
OS: xp pro sp2


Send a message via MSN to warlocke
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.
warlocke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-11-2007, 10:49 AM   #10 (permalink)
Registered User
 
Join Date: Apr 2006
Location: lees summit, missouri
Posts: 146
OS: xp pro sp2


Send a message via MSN to warlocke
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>
warlocke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-11-2007, 11:12 AM   #11 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS

My System

Quote:
Originally Posted by ebackhus View Post
Generally this is located in the htdocs directory on Windows and *nix systems.
You don't want the httpd.conf file in the htdocs folder. htdocs is a public folder and you don't want people to have access to the config file.

Quote:
Originally Posted by warlocke View Post
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
Based on your VHost, http://notperfect.no-ip.org will take you you E:\website\notperfect and http://notperfect.no-ip.org/notperfect will take you to E:\website\notperfect\notperfect
__________________
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-11-2007, 01:08 PM   #12 (permalink)
Registered User
 
Join Date: Apr 2006
Location: lees summit, missouri
Posts: 146
OS: xp pro sp2


Send a message via MSN to warlocke
but its not, i know thats how it should be but its not, its just going to e:\website and the one with the \notperfect goes to

e:\website\notperfect, wats going on here?
warlocke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-11-2007, 07:37 PM   #13 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS

My System

Can you post all of your VHosts?
__________________
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-11-2007, 09:53 PM   #14 (permalink)
Registered User
 
Join Date: Apr 2006
Location: lees summit, missouri
Posts: 146
OS: xp pro sp2


Send a message via MSN to warlocke
<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>
warlocke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-12-2007, 10:14 AM   #15 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS

My System

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.
__________________
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-12-2007, 12:13 PM   #16 (permalink)
Registered User
 
Join Date: Apr 2006
Location: lees summit, missouri
Posts: 146
OS: xp pro sp2


Send a message via MSN to warlocke
o wow didnt even notice that lol, oops thanks
warlocke is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-12-2007, 07:24 PM   #17 (permalink)
Manager, Alternative Comp
 
Skie's Avatar
 
Join Date: Mar 2003
Location: Downers Grove, IL
Posts: 1,821
OS: Gentoo Linux, Redhat Enterprise Linux, CentOS

My System

Did changing that make any difference?
__________________
Skie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 01-12-2007, 09:24 PM   #18 (permalink)