Originally posted by SPeedY_B
do you mean a sub directory as in http://localhost/sub-dir/ or a sub domain as in http://sub.localhost/ ??
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Originally posted by Zedric
Aha, you want a virtual directory?
Use the Alias directive. Not sure exactly how or where but something like this:
Alias /hellohowareyou/ c:/[your document root]/hi/hi2/hey/hellohowareyou/
SPeedY_B: Shouldn't be possible to make a named virtual host? Or is it special with the localhost maybe?
<Directory />
Alias /hellohowareyou/ c:/[your document root]/hi/hi2/hey/hellohowareyou/
Options FollowSymLinks
AllowOverride None
</Directory>
#TMO_SITE
<Directory "E:/WebPage/Wolf_Page/main/">
AllowOverride FileInfo AuthConfig Limit
Options MultiViews -Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
#TMO_SITE
#<VirtualHost *>
# ServerAdmin [email]xxx@xxxxx.org[/email]
# DocumentRoot E:/WebPage/
# ServerName xxx.xxx.xxx.xxx
# ErrorLog logs/error.log
# CustomLog logs/access.log common env=!dontlog
# SetEnvIf Remote_Addr "xxx\.xxx\.xxx\.xxx" dontlog
#</VirtualHost>
I haven't been able to make "real" subdomains when running Apache as localhost.
but a way to "work around" is like this:
#NameVirtualHost *
#DON'T uncomment NameVirtualHost !!!!!!
<VirtualHost 127.0.0.2>
DocumentRoot E:/www/domain1
ServerName 127.0.0.2
</VirtualHost>
<VirtualHost 127.0.0.3>
DocumentRoot E:/www/domain2
ServerName 127.0.0.3
</VirtualHost>
<VirtualHost 127.0.0.4>
DocumentRoot E:/www/domain3
ServerName 127.0.0.4
</VirtualHost>
#TMO_HOME_SITE
<VirtualHost *>
ServerAdmin [email]w0lv3rin3@haqed.org[/email]
DocumentRoot E:/WebPage/Wolf_Page/main/
ServerName tmo.cjb.net
ErrorLog logs/error.log
CustomLog logs/access.log common env=!dontlog
SetEnvIf Remote_Addr "24\.100\.37\.181" dontlog
</VirtualHost>
#TMO_HOME_SITE
#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "C:/Program/Apache Group/Apache2/icons/"
<Directory "C:/Program/Apache Group/Apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>