Virtual Hosting Setup.
Ugh,
I don't understand how to implement this. From what I understand, I dont want IP based hosting. I want name based. I dont have to worry about clients information and security...yet. I went into my httpd.conf file to try and set it up myself, but its not working. Can anyone (*coughtomcough*) try and help me set up virtual hosting with my apache server. |
have you readen the description at the apache website:
http://httpd.apache.org/docs/2.2/vhosts/name-based.html I found it of great use when i first started apache. |
yea I have
|
Can you post what you have so far? If the examples at Apache aren't helping, then examples from us probably won't either.
|
I agree with gilead, post you're part of the Virtual host setting. We'll try "fixing" it for you. And if needed i'll post my Vhost section that i used to use for my server.
|
the problem is I dont know where to put it in my httpd.conf
thats kinda what I wanted examples of so I could see what needs and doesnt need to be edited. |
I'm assuming Apache 2.0.x for this... In your httpd.conf file right at the end should be something like the following:
Code:
NameVirtualHost *:80 |
Yep, my virtual hosting setup is similar to gilead's.
Mark, what do you not understand? Instead of using this syntax: Code:
<VirtualHost *:80> Code:
<VirtualHost [IP address]> So, after you've posted what you've done thus far we can go from there. You don't need to post the entire httpd.conf, but the virtual host you've defined and any other options you've set with "virtualhost" in the name. Peace... |
Where do I find out what the ip addresses are?
|
Quote:
Will these websites all have the same IP address or will they have unique IPs? Or will there be a mixture of IP addresses used? Will the server they will be hosted on be multi-homed (with either multiple physical or virtual network interfaces)? If the server will have just one network interface (i.e. one NIC with one IP address), the IP address of the server is the only IP address you will use, both to configure the virtual hosts (unless you use the "*:80" notation above) AND to setup the DNS settings for each website you intend to host. Here's how it would then work: I point my browser at markness.com and the DNS comes back with aaa.bbb.ccc.ddd. Then my browser contacts machine aaa.bbb.ccc.ddd on port 80 and your Apache server handles the incoming request. It knows the incoming request is for markness.com and uses the virtual host settings for markness.com to serve up that website. Later on, I point my browser at somedomain.net and the DNS comes back with aaa.bbb.ccc.ddd, which is the SAME IP returned for markness.com. Then my browser contacts machine aaa.bbb.ccc.ddd on port 80 and your Apache server handles the incoming request. It knows the incoming request is for somedomain.net and uses the virtual host settings for somedomain.net to serve up that website. So, before we proceed with any virtual hosting setup, you need to let us know what you are wanting to do and what your game plan is. Only then can we provide the best information for you. :) Peace... |
Q. Will these websites all have the same IP address or will they have unique IPs? Or will there be a mixture of IP addresses used?
A. I'm assuming because they're coming from my pc with one nic card, that they're all going to use the same ip address. Q. Will the server they will be hosted on be multi-homed (with either multiple physical or virtual network interfaces)? A. Not quite sure what you mean by multi-homed. The computer sits in my room on my desk, connected to the internet. There are no other computers on that internet line through routers or anything like that, if thats what you're asking. All in all, I'm going to have several different domains pointing to my server. Sorry for the lack of quicker replies. I'm currently registering for classes and dealing with Army BS as usual. |
Quote:
Quote:
Quote:
Here is the template I use for each virtual host I define on my server: Code:
# Domain: xxx Peace... |
Quote:
I will be using PHP on the sites. Would that modify the virtual host config you just posted at all? Quote:
|
Quote:
Here is what the full-blown version looks like: Code:
# Domain: xxx Quote:
Peace... |
All times are GMT -5. The time now is 09:59 AM. |