You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Preston Morris, Jr." <pm...@system-13.com> on 2005/12/21 03:05:29 UTC

[users@httpd] Virtual Host or mod_rewrite

I am a pretty new user to Apache and I set up networks for small businesses (file storage, e-mail, security, etc...). One issue I'm having is that I have a number of services that allow users to complete work remotely and also allow me to administer their servers remotely. The downside is that because they're small businesses, they only have one static IP address.

Here is my question: In order to get domain names to point to the right resources, do I use virtual hosts or mod_rewrite?

Example
Users have access to the following domain names that allow them access to certain services (all of these domain names already have registered DNS "A" records):
email.domainname.com = browser access to email
administration.domainname.com = browser based access to administration tools
ipp.domainname.com = IPP print cababilities with a front end to show them available printers
www.domainname.com = their public website

If a user types "www.domainname.com" it will take them to their htdocs directory and serve their company's public website. If they type "www.domainname.com/ipp" though it will take them to the IPP print page. Other services follow a similar pattern. If a user (or me) types "www.domainname.com:8008" then the administration page loads, asking for a login.

How can I set it up so that just the typed in domain name will point to the appropriate services?

(I'm sorry if this is vague or if I've left out important details. I'm pretty new to Apache administration and I struggling with a way to allow my clients to use just one IP address to serve all of their webserver needs.)

Preston Morris, Jr.
System13 Solutions, LLC
Charlottesville, VA

Re: [users@httpd] Virtual Host or mod_rewrite

Posted by G....@itcilo.org.
> I am a pretty new user to Apache and I set up networks for small 
> businesses (file storage, e-mail, security, etc...). One issue I'm 
> having is that I have a number of services that allow users to 
> complete work remotely and also allow me to administer their servers
> remotely. The downside is that because they're small businesses, 
> they only have one static IP address.
> 
> Here is my question: In order to get domain names to point to the 
> right resources, do I use virtual hosts or mod_rewrite?

Named-based virtual hosts are what you want to use. There is a good 
explanation at http://httpd.apache.org/docs/2.0/vhosts/ on how to 
configure vhosts.

You can then use mod_rewrite inside your vhosts for whatever url 
manipulations you want to do

Regards,

Gaƫl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org