Virtual host... hmmm

Author Message

cosmin ghidoveanu

Sunday 30 November 2003 2:24:20 pm

What is the correct way of creating a virtual host in apache 2.0 on Windows 2000?
My Apache is installed in C:\Program Files\Apache2

the webroot is C:\Program Files\Apache2\htdocs

What do I have to put inside the apache config to make it work?

By the way the virtual host examples given in the documentation prevent Apache from starting when placed in the server config.

Note to developers: have you noticed how easy to install other similar products are? Maybe you should work on that before asking... 3000$, was it? Or provide clear examples in the documentation?

James Packham

Monday 01 December 2003 9:18:36 am

You could add something like:

NameVirtualHost *:80

<Virtualhost *:80>
<Directory [your webroot]>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ /index.php

DocumentRoot [your web root]
ServerName http://[your servername].[your domain.com]
</Virtualhost>

to httpd.conf and edit the square brackets. It's a little basic, but you can keep adding more <virtualhost>[details]</virtualhost> to your hearts content without killing your apache server (assuming this is the same for Win as it is for Lin). I'd recommend the apache documentation on the apache site if you're really having that much trouble with virtual hosting, I know it set me on the right track a couple of times when I was in trouble.

Regards,

James

stig henning

Friday 12 December 2003 8:26:33 am

thank you for extensive posting!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:39:47
Script start
Timing: Jan 18 2025 22:39:47
Module start 'layout'
Timing: Jan 18 2025 22:39:47
Module start 'content'
Timing: Jan 18 2025 22:39:47
Module end 'content'
Timing: Jan 18 2025 22:39:47
Script end

Main resources:

Total runtime0.0114 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0041 587.9141152.6250
Module start 'layout' 0.00410.0020 740.539139.4453
Module start 'content' 0.00620.0037 779.984489.3359
Module end 'content' 0.00980.0016 869.320334.3047
Script end 0.0114  903.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002219.2090140.0002
Check MTime0.00108.6152140.0001
Mysql Total
Database connection0.00065.343810.0006
Mysqli_queries0.001513.241730.0005
Looping result0.00000.095910.0000
Template Total0.001311.310.0013
Template load0.00076.008910.0007
Template processing0.00065.300010.0006
Override
Cache load0.00054.005310.0005
General
dbfile0.00021.407480.0000
String conversion0.00000.045940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs