24 Aug 13:16
Squeak + VirtualHost + KomHTTP
From: Herve Darce <squeak <at> moncase.fr>
Subject: Squeak + VirtualHost + KomHTTP
Newsgroups: gmane.comp.lang.smalltalk.squeak.beginners
Date: 2008-08-24 11:16:50 GMT
Subject: Squeak + VirtualHost + KomHTTP
Newsgroups: gmane.comp.lang.smalltalk.squeak.beginners
Date: 2008-08-24 11:16:50 GMT
Hi,
I want to use the virtual hosting. The package ModVhost can do that.
Also, I shutdown apache and I do use only squeak.
I shutdown all services. "HttpService allInstancesDo: [:each | each
stop. each unregister]."
Then, I open on my pc two virtualhosts: localhost and mymachine.
ma := ModuleAssembly core.
ma virtualHost: 'localhost' do:
[ma addPlug:
[ :request |
HttpResponse fromString: 'You are seeing content for localhost']].
ma virtualHost: 'mymachine' do:
[ma addPlug:
[ :request |
HttpResponse fromString: 'You are seeing content for mymachine']].
ma addPlug:
[ :request |
HttpResponse fromString: 'You are seeing default content for other'].
(HttpService startOn: 8080 named: 'Example') module: ma rootModule.
I get the same page 'You are seeing default content for other' for three
cases:
* http://localhost:8080
* http://mymachine:8080
* http://127.0.0.1
I had to get three different pages:
(Continue reading)
RSS Feed