Page 1 of 1

Run with: httpd.exe -D parameter-name?

PostPosted: 20. July 2011 11:50
by marijnkampf
I use Xampp for my local development, and would like to add a parameter-name to the httpd.exe call so it can be used in a IfDefine (http://httpd.apache.org/docs/2.0/mod/core.html#ifdefine)

E.g.: httpd.exe -k runservice -D local
(the '-k runservice' is automatically added by Xampp I believe - I would like to be able to add '-D local')

Is it possible to set this up through Xampp so I don't have to manually add this to the Apache service, every time it (re-)starts?

In case there may be an alternative solution, I'm using the following .htaccess to provide different locations for the password file, whilst using a single .htaccess files for the dev and live servers.

Code: Select all
<IfDefine local>
AuthUserFile c:/localdev/location/.htpasswd
AuthName "Dev"
AuthType Basic
</IfDefine>
<IfDefine !local>
AuthUserFile /live/server/different/location/.htpasswd
AuthName "Live"
AuthType Basic
</IfDefine>


Source based on: http://stackoverflow.com/questions/736524/how-can-i-have-a-conditional-htaccess-block

Re: Run with: httpd.exe -D parameter-name?

PostPosted: 16. February 2013 14:40
by Terrabus
Bump. I'm also keen to find this out. On mac I got this happening by editing this file: xamppfiles/bin/apachectl

It's possible with the bat files, but they don't seem to be called by the control panel.
I thought it would make sense to edit the 'xampp-control.ini' [BinaryNames], but nope. This gets reset on running the control panel.

Would be much appreciative if anyone could solve all of my problems.

Re: Run with: httpd.exe -D parameter-name?

PostPosted: 19. February 2013 23:23
by hackattack142
Hello,

That is doable I have just not got around to adding custom parameters yet but it is on my list.