KomServices

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

KomServices

Ramon Leon
Hi, anyone know where I can find information about restricting Kom to
listen on a single port on a specific IP address?  I'm on a windows box
and apache is not an option at the moment, but I have enough IP's to
host an image per IP for what I need.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomServices

Avi  Bryant

On Mar 13, 2006, at 3:35 PM, Ramon Leon wrote:

> Hi, anyone know where I can find information about restricting Kom to
> listen on a single port on a specific IP address?  I'm on a windows  
> box
> and apache is not an option at the moment, but I have enough IP's to
> host an image per IP for what I need.

Look for a send to #listenOn:backlogSize:  and change it to  
#listenOn:backlogSize:interface: .

Avi
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: KomServices

Ramon Leon
In reply to this post by Ramon Leon
Thanks, will do, however, any chance you can make this configurable
somehow, I'm sure it's a common need and I don't want to have to
maintain a separate version. It'd be nice to be able to say...
WAKomEncoded startOn: 80 address: #.#.#.#.

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf
> Of Avi Bryant
> Sent: Monday, March 13, 2006 4:43 PM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: Re: [Seaside] KomServices
>
>
> On Mar 13, 2006, at 3:35 PM, Ramon Leon wrote:
>
> > Hi, anyone know where I can find information about
> restricting Kom to
> > listen on a single port on a specific IP address?  I'm on a windows
> > box and apache is not an option at the moment, but I have
> enough IP's
> > to host an image per IP for what I need.
>
> Look for a send to #listenOn:backlogSize:  and change it to
> #listenOn:backlogSize:interface: .
>
> Avi
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: KomServices

Ramon Leon
In reply to this post by Ramon Leon
>
> Look for a send to #listenOn:backlogSize:  and change it to
> #listenOn:backlogSize:interface: .
>
> Avi

Had no luck getting this to work last night.  I found a sender in
WAListener>>listenLoop but it appears to be unused, I could find no
class refs to WAListener, I'm using latest 2.6a3 from repository.  I
really need to be able to bind Kom to a single ip, and serve static
files as well.  I'm currently using this startup script I found from
Shaffer-Consulting.com seaside tutorial.

startOn: aPort
    | ma seaside |
    "Kill all existing Kom HTTP servers"
    HttpService allInstancesDo: [:each | each stop. each unregister].

    "Start a new server on port servering both static content and
seaside apps"
    seaside := WAKom default.
    ma := ModuleAssembly core.
    ma serverRoot: (FileDirectory default directoryNamed: 'content')
fullName.
    ma alias: '/seaside' to: [ma addPlug: [:request | seaside process:
request]].
    ma documentRoot: (FileDirectory default directoryNamed: 'content')
fullName.
    ma directoryIndex: 'index.html index.htm'.
    ma serveFiles.
    (HttpService startOn: aPort named: 'httpd') plug: ma rootModule.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: KomServices

Ramon Leon
In reply to this post by Ramon Leon
>
> Look for a send to #listenOn:backlogSize:  and change it to
> #listenOn:backlogSize:interface: .
>
> Avi

Also, forgot to mention in previous post, WAListener references 3
undeclared variables, at least in my image.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomServices

Yanni Chiu
In reply to this post by Ramon Leon
Ramon Leon wrote:
>>Look for a send to #listenOn:backlogSize:  and change it to
>>#listenOn:backlogSize:interface: .
>>
>>Avi
>
>
> Had no luck getting this to work last night.

I seem to recall a thread about a year or more ago (on squeak-dev),
regarding a limitation in the VM socket code around the interface
binding issue. I think someone had an issue with multiple network
interfaces on a single machine. Not sure if this is related to your
problem.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomServices

Avi  Bryant
In reply to this post by Ramon Leon

On Mar 14, 2006, at 8:38 AM, Ramon Leon wrote:

>>
>> Look for a send to #listenOn:backlogSize:  and change it to
>> #listenOn:backlogSize:interface: .
>>
>> Avi
>
> Had no luck getting this to work last night.  I found a sender in
> WAListener>>listenLoop but it appears to be unused, I could find no
> class refs to WAListener, I'm using latest 2.6a3 from repository.  I
> really need to be able to bind Kom to a single ip, and serve static
> files as well.

Sorry, I should have been more specific.  You want to modify  
TcpListener>>pvtNewListener:.

Avi
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: KomServices

Ramon Leon
In reply to this post by Ramon Leon
>
> Sorry, I should have been more specific.  You want to modify  
> TcpListener>>pvtNewListener:.
>
> Avi
> _______________________________________________

Oh, I thought you meant in Seaside, OK, I'll give that a shot tonight
and see how it goes, thanks.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: KomServices

Ramon Leon
In reply to this post by Ramon Leon
>
> Sorry, I should have been more specific.  You want to modify  
> TcpListener>>pvtNewListener:.
>
> Avi
> _______________________________________________

OK, I gave up on binding to an IP after crashing the image several
times.  I decided to try the Apache approach, and use rewrite rules.
Setup Apache on my windows box, setup virtual hosting with something
like the following:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName subdomainOne.mydomain.com
    RewriteEngine On
    RewriteRule ^/(.*)$ http://localhost:81/$1 [P,L]
</VirtualHost>

<VirtualHost *:80>
    ServerName www.goodiebagsparties.com
    RewriteEngine On
    RewriteRule ^/(.*)$ http://localhost:92/$1 [P,L]
</VirtualHost>

<VirtualHost *:80>
    ServerName subdomainTwo.mydomain.com
    RewriteEngine On
    RewriteRule ^/taskManager(.*)$
http://localhost:94/seaside/taskManager/$1 [P,L]
    RewriteRule ^/customerManager(.*)$
http://localhost:94/seaside/customerManager/$1 [P,L]
    RewriteRule ^/qhm(.*)$ http://localhost:93/seaside/qhm/$1 [P,L]
</VirtualHost>

And for the most part, things work fine, until I try and upload a file,
at which point I get

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET
/goodieBags/SCAdminHome.

Reason: Error reading from remote server

Anyone have an idea why everything works except for uploading files?
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomServices

cdavidshaffer
Ramon Leon wrote:

> [snip]
>
>And for the most part, things work fine, until I try and upload a file,
>at which point I get
>
>Proxy Error
>
>The proxy server received an invalid response from an upstream server.
>The proxy server could not handle the request GET
>/goodieBags/SCAdminHome.
>
>Reason: Error reading from remote server
>
>Anyone have an idea why everything works except for uploading files?
>  
>

No idea why this problem exists but I know a workaround: disable "keep
alive":

(HttpService serviceNamed: 'httpd') keepAlive: false

Hope that helps...

David


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: KomServices

Ramon Leon
In reply to this post by Ramon Leon
>
> No idea why this problem exists but I know a workaround: disable "keep
> alive":
>
> (HttpService serviceNamed: 'httpd') keepAlive: false
>
> Hope that helps...
>
> David

Dude, thanks so much, that worked perfect, problem solved.  If anyone
knows why this is an issue, I'd love to hear it.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside