• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Apachie Web Server Win32 Sub-Dir

SPeedY_B

I may actually be insane.
#4
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:
 

w0lv3rin3

The Source
Political User
#6
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>
 
#7
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?
 

w0lv3rin3

The Source
Political User
#8
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>
 

w0lv3rin3

The Source
Political User
#9
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>
 

SPeedY_B

I may actually be insane.
#10
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>
 

w0lv3rin3

The Source
Political User
#11
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/
 
#12
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>
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,012
Latest member
Sierge