Apachie Web Server Win32 Sub-Dir

Discussion in 'Windows Desktop Systems' started by w0lv3rin3, Apr 30, 2003.

  1. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    Apachie Web Server Win32 Sub-Dir

    any1 know how to make em???
     
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    do you mean a sub directory as in http://localhost/sub-dir/ or a sub domain as in http://sub.localhost/ ??
     
  3. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    http://localhost/sub-dir/

    and

    http://sub.localhost/

    if thats possible
     
  4. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    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:
     
  5. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
  6. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    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. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    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?
     
  8. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON

    so like this?
    Code:
    <Directory />
    Alias /hellohowareyou/ c:/[your document root]/hi/hi2/hey/hellohowareyou/
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    
     
  9. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    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>
    
     
  10. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    found this via google, haven't tried it yet though

     
  11. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    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. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    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>
    
     
  13. w0lv3rin3

    w0lv3rin3 The Source Political User

    Messages:
    465
    Location:
    Barrie, ON
    OMG, thats exactly, what i wanted, man ur the best, thx alot