Forum

url toolkit set environment

killasmurf86
9 August 2010, 11:08
Hello!
It would be very useful if I could set environment variables with toolkits.
This would be very useful for cgit (for example)

for example:
http://cgit.example.com/user1
http://cgit.example.com/user2

would allow each user to use own cgit config, witch can be set with environment variable
Setenv CGIT_CONFIG = /srv/www/bsdroot.lv/git/user1.cgit.rc
Setenv CGIT_CONFIG = /srv/www/bsdroot.lv/git/user2.cgit.rc

Currently to do that I need to create Virtual web server for each user

user1.cgit.example.com
user2.cgit.example.com

Do I make sense?

Also this could also help later develop simple multiuser CGI apps? Don't you think?

Hiawatha version:
Hiawatha v7.3, cache, Monitor, SSL, URL toolkit, XSLT

Operating System:
FreeBSD 8.1-RELEASE amd64
Hugo Leisink
9 August 2010, 22:39
Although it would be useful for your website, I don't think it's a good idea to include it in a webserver. Placing parts of the business logic of your application not in your application, but in your webserver configuration is not a wise thing to do if you ask me. You better place the user-config-selection code in your application instead of in your webserver configuration.
killasmurf86
11 August 2010, 10:53
Actually you're right.... and I came up with very simple solution.... I won't even need to modify cgit
Instead I can write simple sh wrapper
This topic has been closed.