logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



[REQUEST] Change httpd.conf in builds to `Define` srvroot

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
Nux



Joined: 08 Jun 2016
Posts: 1
Location: Poland, 3city

PostPosted: Fri 10 Jun '16 13:15    Post subject: [REQUEST] Change httpd.conf in builds to `Define` srvroot Reply with quote

Hi.

So with current distributions of Apache on ApacheLounge in reality you need to put them in "C:\Apache24" or you would have to change a lot in `httpd.conf`. It's not a lot of work change default `httpd.conf` but it's tricky for some new comers (I work at IT company and I just know Wink).

So... The solution for any Apache 2.4 build would be to use new `Define` directive. That way you can define something like `SRVROOT` and use this in httpd.conf in any other place

Crucial parts of modified httpd.conf would look like this:
Code:

Define SRVROOT "C:/Apache24"
ServerRoot "${SRVROOT}"
...
DocumentRoot "${SRVROOT}/htdocs"
<Directory "${SRVROOT}/htdocs">
...
    ScriptAlias /cgi-bin/ "${SRVROOT}/cgi-bin/"
...
<Directory "${SRVROOT}/cgi-bin">


But I Would simply replace all occurrences of "C:/Apache24" with "${SRVROOT}" (including comments).

Note that this `Define` works in all possible directives (even non standard ones like e.g. `ISAPICacheFile`).
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2710
Location: Hilversum, NL, EU

PostPosted: Fri 10 Jun '16 15:04    Post subject: Reply with quote

Agree. But policy is that we do not change things what ASF delivers.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2710
Location: Hilversum, NL, EU

PostPosted: Fri 08 Jun '18 11:49    Post subject: Reply with quote

Committed for the next release, see http://svn.apache.org/viewvc?view=revision&sortby=date&revision=1832962
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6529
Location: Germany, Next to Hamburg

PostPosted: Wed 13 Jun '18 11:44    Post subject: Reply with quote

You did not commit it in trunk
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 2710
Location: Hilversum, NL, EU

PostPosted: Wed 13 Jun '18 11:50    Post subject: Reply with quote

It was already there: http://svn.apache.org/viewvc?view=revision&sortby=date&revision=1451830

I did:

In my branches working copy

svn merge -c 1451830 https://svn.apache.org/repos/asf/httpd/httpd/trunk

svn ci
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6529
Location: Germany, Next to Hamburg

PostPosted: Wed 13 Jun '18 16:02    Post subject: Reply with quote

Maybe I was in viewwc in the wrong revision. Embarassed
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1