SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Apache Startup Help?

    Hello,

    I'm trying to start up Apache (in a dos box running under XP) and tell it to set the DocumentRoot and <Directory=> directives in the httpd.conf file.

    In other words, I have several different websites on my system and I need some way to start apache that sets the document root to wherever I specify without having to edit the httpd.conf file every time.

    I'm assuming :

    apache -k -C DocumentRoot="/usr/bin/myfiles"

    or something along those lines.

    Is this possible?

    I was wondering to, if you set an environment variable in dos for instance, SET DocumentRoot="/whatever", can I stick something like DocumentRoot=%DocumentRoot% in the httpd.conf

    Thanks in advance!

    holmescreek
    Last edited by holmescreek; Apr 7, 2002 at 10:50.

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may be able to use the mod-rewrite. I have a feeling there may be something in there for routing what you want.

    Hopefully someone with more apache knowledge can help you more specifically.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    Didn't think of that. Seems like there would be some easy startup option to do it. I guess I could write a little util in C that scans the config file and replaces whatever I want, then starts Apache.


    Originally posted by Maelstrom
    You may be able to use the mod-rewrite. I have a feeling there may be something in there for routing what you want.

    Hopefully someone with more apache knowledge can help you more specifically.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •