Apache: How do I make a virtual host mirror?

Posted by admin | Virtualhosting | Tuesday 31 January 2012 7:00 pm


ServerAdmin admin@whateverdomain.com
DocumentRoot “C:\rootstuff”
ServerName servername.com

that works, but lets say I want a specific subdomain of my domain to forward to another site. How would I do that?
I tried:

ServerAdmin admin@whateversite
DocumentRoot “http://thesiteIwanttoforwardto.com/”
ServerName servername.com

but apache won’t start when I do this.

To elaborate, I want people to be able to access my own server at www.mysitename.com but if they go to www.mysitename.com/subdirectory then it will forward them without the use of html redirection and display www.theothersite.com’s page (A virtual host mirror)

Technorati Tags: , , ,

Tech Shot 1 – Apache Virtual Host Config

Posted by admin | Virtualhosting | Wednesday 25 January 2012 2:09 pm


In the pilot episode, I cover Apache virtual host configuration under Debian-based Linux. I’m sponsored by VaultTec and there’s even a mess up or two. Tech Shot is my attempt at a technology how-to/tutorial show. If you need to know how to do something for Windows or Linux, with hardware or software, or even how to stop that Runner better than Logan and Francis, I’ve got you covered. Please be aware that I am aware of all of the problems with this video. I had major technical difficulties from the start. Primarily my camera and microphone died and I had to record this entire thing with a point-and-shoot digital camera. Hence the lighting is off, the audio isn’t leveled properly (post editing simply made it worse), and the rendering from my video editor shaved off some of the titles. I promise that things will get better as I learn better techniques and get better equipment.

Technorati Tags: , , , , ,

Apache dynamic virtual hosts?

Posted by admin | Virtualhosting | Saturday 14 January 2012 2:27 pm

im running a localhost server. i want to create a dynamic virtual hosts.

http://dude/ -> /home/dude/public_html
http://bro/ -> /home/bro/public_html
…and so on.

I follow exactly in apache help but no avail. The server stop with syntax error on my conf with point to VirtualDocumentRoot line. please how do i really do this..pointing the url to /home/*/public_html.

Thanks
im running a localhost server. i want to create a dynamic virtual hosts.

http://dude/ -> /home/dude/public_html
http://bro/ -> /home/bro/public_html
…and so on.

I follow exactly in apache help but no avail. The server stop with syntax error on my conf with point to VirtualDocumentRoot line. please how do i really do this..pointing the url to /home/*/public_html.

[code]
UseCanonicalName off
Nameserver 192.168.0.99:80
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon


....


ServerName *
VirtualDocumentRoot /home/%0/public_html
VirtualScriptAlias /home/%0/public_html/cgi-bin

Technorati Tags: , , ,

Problem creating virtual hosts in apache?

Posted by admin | Virtualhosting | Monday 2 January 2012 2:09 pm

Hi All, I am trying to create virtual hosts on apache on linux box. My httpd-vhosts.conf is as follows:
NameVirtualHost *:80

ServerAdmin admin@site1.com
ServerName www.site1.com
ServerAlias site1.com
DocumentRoot “/nfs/site1/html”

Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

ErrorLog logs/site1/error_log
CustomLog logs/site1/access_log common

Similarly, I’ve another virtual host for site2 whose docroot is “/nfs/site2/html”.

I’ve added the following lines in /etc/hosts file: IP_Address www.site1.com IP_Address www.site2.com Now, If I open browser and type my IP address then it is executing the code in /nfs/site1/html folder. But if I try to access www.site1.com from browser its displaying the message “website cannot be found”. So I used www.site1.com:80, still I get the same error message. Can anyone please help me on this.
Thanks,
Mohan
Hi All,
Thanks for ur inputs. Now I am able to create virtual hosts and they are working fine when I hit them on my pc. Now, if I want to access those virtual sites from other machines what are the steps I have to follow. Can any one please tell me.
Thanks,
Mohan

Technorati Tags: , , , ,

Setup WAMP Apache to use virtual hosts instead of aliases? (also mod_rewrite)?

Posted by admin | Virtualhosting | Saturday 24 September 2011 4:01 pm

I want to emulate my web hosting account locally for development and testing, using WAMPSERVER 2.0 under Windows..

So I can add an entry in the .hosts, eg. “local.mydomain.com” pointing at “127.0.0.1″, no problem there, but how do I get Apache configured to use the virtual host name? I have no problem setting up folder aliases, eg. localhost/mydomain, I just don’t know how to map the virtual host name to a directory like you would do in an alias.

Next issue is enabling url rewriting. I uncommented the line “LoadModule rewrite_module modules/mod_rewrite.so” in httpd.conf but this doesn’t seem to be enough.. I am using Drupal 6.6 but it is detecting that rewrite is not enabled, possibly this is because it is running from an alias folder..

Quick 10 points for first correct answer, I don’t need a long detailed write up on Apache config. Thanks. :-)

Technorati Tags: , , , , , , , ,

How To Add Apache Virtual Hosts

Posted by admin | Virtualhosting | Wednesday 24 August 2011 2:05 pm


How To Add Apache Virtual Hosts

Technorati Tags: , ,

Name based virtual host – Apache?

Posted by admin | Virtualhosting | Saturday 20 August 2011 2:11 pm

I am running Red Hat with Apache v.2. I am trying to set up my machine to host my club website as well as my family website. I’ve gone through the Apache site to try and get it running but to no luck. Has anybody done this before who can help me get this set up and running? I’ve got the code available if you wan to look at it – everything compiles correctly and I have the service running, I just get a file not found error when I set it up as a virtual host. If I have it set with just one website (no virtual hosting) it does exactly what it is supposed to do.

Technorati Tags: , , , ,

Install Apache Webserver, Live Virtual Hosts in WampServer – Part 7

Posted by admin | Virtualhosting | Saturday 6 August 2011 2:05 pm


A tutorial on setting up live virtual hosts in Apache webserver on Windows using WampServer. www.danscourses.com

Technorati Tags: , , , , , , ,

How to configure Apache virtual hosts

Posted by admin | Virtualhosting | Monday 18 July 2011 2:09 pm


This video will show you how to configure Apache virual hosts on your local webserver.

Technorati Tags: , , ,

Apache Virtual host is not redirecting one of my 3 vhosts to its dir. What could be the problem? ?

Posted by admin | Virtualhosting | Monday 11 July 2011 2:06 pm

I changed the order of the containers and the same happens. When I type the address it goes to the default vhost container. (the first one)

Technorati Tags: , , , , , , ,

Next Page »