Apachie Web Server Win32 Sub-Dir

w0lv3rin3

The Source
Political Access
Joined
18 Mar 2004
Messages
465
Apachie Web Server Win32 Sub-Dir

any1 know how to make em???
 
do you mean a sub directory as in http://localhost/sub-dir/ or a sub domain as in http://sub.localhost/ ??
 
to get localhost/sub you just need to create more folders in your document root (specified in httpd.conf)

I don't actually think that sub domains are possible on localhost though :confused:
 
like in config i see

Code:
# 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>


how can i add subdir in

Code:
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
 
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?
 
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?


so like this?
Code:
<Directory />
Alias /hellohowareyou/ c:/[your document root]/hi/hi2/hey/hellohowareyou/
    Options FollowSymLinks
    AllowOverride None
</Directory>
 
ok heres what i got

Code:
#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

now when i have togoto url, i have to type in


http://localhost/wolf_page/main/ for me to get to my url
i want to just do this

http://localhost/main/


this is my VH
Code:
#<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>
 
found this via google, haven't tried it yet though

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>
 
how do i do it with a local host?


and i want to do it like this


http://localhost/wolf_page/main/ for me to get to my url
i want to just do this

http://localhost/main/


also, im using VH

Code:
#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

my root is e:/Webpage

but it will only open dir E:/WebPage/Wolf_Page/main/
 
I think virtual hosts is tricky in this case. Here is the Alias solution btw. You don't need to use the <Directory> statement, it's just if you want to change the attributes. Cut from my httpd.conf file:
Code:
#
# 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>
 
OMG, thats exactly, what i wanted, man ur the best, thx alot
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back