Seaside and Apache, httpd.conf issue

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

Seaside and Apache, httpd.conf issue

Leandro Perez-2
Hello list

I'm trying to make Seaside work behind Apache. I just want to try it out, it's not for production, so I'll be running the Seaside server in the same machine that Apache.

I've allready installed Apache and it's up and running on port 80. Requests to http://localhost work just fine

For the Seaside part, I'm running a TinyHttp server on port 7777. The seaside apps are running ok, i.e. http://localhost:7777/seaside/go works well
I'm using VWnc and Seaside 2.8. (ForWebToolkit)

After many alternatives, this is my actual virtual host configuration for Apache (httpd.conf):

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName localhost
    RewriteEngine On
    ProxyVia Block
    ProxyPreserveHost On
    RewriteRule ^/(seaside/go/.*)$ http://localhost:7777/$1 [P,L,NS]
</VirtualHost>

The problem I have is, if I access http://localhost/seaside/go (accessing via apache) an Exception is Thrown in smalltalk. So it looks like Apache is redirecting the requests to the seaside server but,  It looks like a file is being requested instead of the actual request.
I'm missing something in the httpd.conf, I have no idea of what it could be..
Any hints?
I've read the post in Ramon Leon's blog (http://onsmalltalk.com/programming/smalltalk/running-seaside-apache-and-iis-on-windowsxp/) and in Boris Popov's blog (http://leftshore.wordpress.com/2006/10/27/hint-setting-up-apache-proxy-for-your-seaside-host/) on this subject, also a few posts on the mailing list. But is too late and I can't find the answer.

Anyone?
Thanks a lot :) !
ps: Here is part of the stack trace.

Unhandled exception: ERROR_FILE_NOT_FOUND ("c:\Archivos de programa\Cincom\vw7.6nc\web\examples\seasidego")
FileErrorHolder class(OSErrorHolder class)>>reportProceedingOn:
FileErrorHolder(OSErrorHolder)>>reportErrorProceeding
optimized [] in OSErrorHolder class>>initializeErrorActions
SystemError>>handleErrorFor:
NTFSFilename(Filename)>>isDirectory
VisualWave.WebSiteFile>>canServeFile
optimized [] in VisualWave.WebSiteFile>>handleFileRequest
SignalHandler>>handleDo:
SignalHandler>>handleDo:
HandlerList>>handleDo:
VisualWave.WebSiteFile>>handleFileRequest
VisualWave.WebSiteFile>>doGet
VisualWave.WebSiteFile(VisualWave.SingleThreadModelServlet)>>service:response:
VisualWave.ServletHandler>>basicEvaluate
optimized [] in VisualWave.WWHandler>>evaluate
BlockClosure>>on:do:
VisualWave.ServletHandler(VisualWave.WWHandler)>>evaluate
VisualWave.ServletHandler>>sendEntityOver:
VisualWave.ServletHandler(VisualWave.WWHandler)>>sendHTTPOver:forServer:forRequest:
optimized [] in VisualWave.WebRequest>>answerWith:
BlockClosure>>on:do:
VisualWave.WebRequest>>answerWith:
VisualWave.HttpWebRequestService(VisualWave.WebRequestService)>>privateDispatchRequest:
VisualWave.HttpWebRequestService(VisualWave.WebRequestService)>>dispatchRequest:
VisualWave.HttpWebRequestService(VisualWave.WebRequestService)>>privateServe:
optimized [] in VisualWave.WebRequestService>>serveMarshaller:
BlockClosure>>on:do:
VisualWave.HttpWebRequestService(VisualWave.WebRequestService)>>serveMarshaller:
VisualWave.WaveMarshaler>>handleIncomingMessageOn:
optimized [] in [] in VisualWave.WaveTransport>>handlingIncomingMessage
BlockClosure>>ensure:
optimized [] in VisualWave.WaveTransport>>handlingIncomingMessage
BlockClosure>>on:do:
VisualWave.WaveTransport>>handlingIncomingMessage
VisualWave.WaveTransport>>serverProcessBody
optimized [] in Opentalk.Transport>>startServerProcess
BlockClosure>>on:do:
optimized [] in Process class>>forBlock:priority:

----------------------------------------------------------------------
FileErrorHolder class(OSErrorHolder class)>>reportProceedingOn:
Receiver:
    a FileErrorHolder class
Instance Variables:
    superclass = OSErrorHolder
    methodDict = a MethodDictionary[3]
    format = 16386
    subclasses = nil
    instanceVariables = an Array[1]
    organization = ('accessing' #errorString #filename #filename:)

    name = #FileErrorHolder
    classPool = a NameSpaceOfClass[0]
    environment = a NameSpace[104]
Arguments:
    anErrorHolder = a FileErrorHolder(Error: ERROR_FILE_NOT_FOUND)
Temporaries:
    errorSignal = OSErrorHolder nonexistentSignal
Context PC = 31


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

Re: Seaside and Apache, httpd.conf issue

Leandro Pérez
Hello, I'm answering myself.. sorry :)
I was just missing a "/" before the "$1 [P,L]", so Apache was mapping all "/seaside/*" to "/seaside",
e.g. http://localhost/seaside/go -> mapped to -> http://localhost:7777/seasidego instead of http://localhost:7777/seaside/go 

here is the correct httpd.conf, each request starting with /seaside/ is mapped to the seaside server..

    NameVirtualHost *:80

    <VirtualHost *:80>
        ServerName localhost
        RewriteEngine On
        ProxyVia Block
        ProxyPreserveHost On
        RewriteRule ^/seaside/(.*)$ http://localhost:7777/seaside/$1 [P,L] # I was missing the last "/" before the "$1 [P,L]"
    </VirtualHost>



On Sat, May 24, 2008 at 8:25 PM, Leandro Perez <leandromperez@gmail.com> wrote:
    Hello list
....
Reply | Threaded
Open this post in threaded view
|

re: Seaside and Apache, httpd.conf issue

Maarten Mostert-2
In reply to this post by Leandro Perez-2

Hi,

Configuring Apache is a real pain job and not so much documented. However I run with the same configuration as you do VW's TinyHttp and Apache 2.061 on a low cost VPN offering sharing many things through Apache.

It might not be perfect but here you go for my httpd.conf.  Don't forget to write ALL the file libraries to your public directory respecting the file structure.

Rgrds,

@+Maarten,


===============================================

<VirtualHost 193.34.17.215:80>

ServerName mydomain.com

ServerAlias www.mydomain.com

RewriteEngine On

RewriteRule ^/$ /index [R]

# DocumentRoot /home/maarten/public_html

# only allow Seaside rewrite rule to fire, when request doesn't match an existing file

# RewriteCond /home/maarten/public_html/%{REQUEST_FILENAME} !-f

# if no file was found, proxy the request to Seaside

# RewriteRule ^/(.*)$ http://localhost:8888/index/ [P,L]

# Set up general proxy properties

ProxyRequests Off

ProxyPreserveHost On

<Proxy *>

Order deny,allow

Allow from none

</Proxy>

# Set up main application URL

<Location /index>

Order deny,allow

Allow from all

# Proxy all requests to /home down to the actual host running Seaside

ProxyPass http://193.34.17.215:8888/index

ProxyPassReverse http://193.34.17.215:8888/index

</Location>

# Additional aliases to serve files normally served by Seaside;

# this is a simple optimization to reduce load on the app server

# by letting Apache do what it does best, serve static files;

# normally in development these directories are served by Seaside

# to keep development environment simpler

Alias /files /home/maarten/public_html/files

Alias /images /home/maarten/public_html/images

# Alias /css /home/maarten/public_html/css

<Directory /home/maarten/public_html>

<Limit GET>

Order allow,deny

Allow from all

</Limit>

</Directory>




> Message du 24/05/08 20:26

> De : "Leandro Perez"
> A : "Seaside - general discussion"
> Copie à :
> Objet : [Seaside] Seaside and Apache, httpd.conf issue
>
> Hello list
>
> I'm trying to make Seaside work behind Apache. I just want to try it out, it's not for production, so I'll be running the Seaside server in the same machine that Apache.
>
> I've allready installed Apache and it's up and running on port 80. Requests to http://localhost work just fine
>
> For the Seaside part, I'm running a TinyHttp server on port 7777. The seaside apps are running ok, i.e. http://localhost:7777/seaside/go works well
> I'm using VWnc and Seaside 2.8. (ForWebToolkit)
>
> After many alternatives, this is my actual virtual host configuration for Apache (httpd.conf):
>
>

NameVirtualHost *:80
>
>
>     ServerName localhost
>     RewriteEngine On
>     ProxyVia Block
>     ProxyPreserveHost On
>     RewriteRule ^/(seaside/go/.*)$ http://localhost:7777/$1 [P,L,NS]
>
>


> The problem I have is, if I access http://localhost/seaside/go (accessing via apache) an Exception is Thrown in smalltalk. So it looks like Apache is redirecting the requests to the seaside server but,  It looks like a file is being requested instead of the actual request.
> I'm missing something in the httpd.conf, I have no idea of what it could be..
> Any hints?
> I've read the post in Ramon Leon's blog (http://onsmalltalk.com/programming/smalltalk/running-seaside-apache-and-iis-on-windowsxp/) and in Boris Popov's blog (http://leftshore.wordpress.com/2006/10/27/hint-setting-up-apache-proxy-for-your-seaside-host/) on this subject, also a few posts on the mailing list. But is too late and I can't find the answer.
>
> Anyone?
> Thanks a lot :) !
> ps: Here is part of the stack trace.
>
>

Unhandled exception: ERROR_FILE_NOT_FOUND ("c:\Archivos de programa\Cincom\vw7.6nc\web\examples\seasidego")
> FileErrorHolder class(OSErrorHolder class)>>reportProceedingOn:
> FileErrorHolder(OSErrorHolder)>>reportErrorProceeding
> optimized [] in OSErrorHolder class>>initializeErrorActions
> SystemError>>handleErrorFor:
> NTFSFilename(Filename)>>isDirectory
> VisualWave.WebSiteFile>>canServeFile
> optimized [] in VisualWave.WebSiteFile>>handleFileRequest
> SignalHandler>>handleDo:
> SignalHandler>>handleDo:
> HandlerList>>handleDo:
> VisualWave.WebSiteFile>>handleFileRequest
> VisualWave.WebSiteFile>>doGet
> VisualWave.WebSiteFile(VisualWave.SingleThreadModelServlet)>>service:response:
> VisualWave.ServletHandler>>basicEvaluate
> optimized [] in VisualWave.WWHandler>>evaluate
> BlockClosure>>on:do:
> VisualWave.ServletHandler(VisualWave.WWHandler)>>evaluate
> VisualWave.ServletHandler>>sendEntityOver:
> VisualWave.ServletHandler(VisualWave.WWHandler)>>sendHTTPOver:forServer:forRequest:
> optimized [] in VisualWave.WebRequest>>answerWith:
> BlockClosure>>on:do:
> VisualWave.WebRequest>>answerWith:
> VisualWave.HttpWebRequestService(VisualWave.WebRequestService)>>privateDispatchRequest:
> VisualWave.HttpWebRequestService(VisualWave.WebRequestService)>>dispatchRequest:
> VisualWave.HttpWebRequestService(VisualWave.WebRequestService)>>privateServe:
> optimized [] in VisualWave.WebRequestService>>serveMarshaller:
> BlockClosure>>on:do:
> VisualWave.HttpWebRequestService(VisualWave.WebRequestService)>>serveMarshaller:
> VisualWave.WaveMarshaler>>handleIncomingMessageOn:
> optimized [] in [] in VisualWave.WaveTransport>>handlingIncomingMessage
> BlockClosure>>ensure:
> optimized [] in VisualWave.WaveTransport>>handlingIncomingMessage
> BlockClosure>>on:do:
> VisualWave.WaveTransport>>handlingIncomingMessage
> VisualWave.WaveTransport>>serverProcessBody
> optimized [] in Opentalk.Transport>>startServerProcess
> BlockClosure>>on:do:
> optimized [] in Process class>>forBlock:priority:
>
> ----------------------------------------------------------------------
> FileErrorHolder class(OSErrorHolder class)>>reportProceedingOn:
> Receiver:
>     a FileErrorHolder class
> Instance Variables:
>     superclass = OSErrorHolder
>     methodDict = a MethodDictionary[3]
>     format = 16386
>     subclasses = nil
>     instanceVariables = an Array[1]
>     organization = ('accessing' #errorString #filename #filename:)
>
>     name = #FileErrorHolder
>     classPool = a NameSpaceOfClass[0]
>     environment = a NameSpace[104]
> Arguments:
>     anErrorHolder = a FileErrorHolder(Error: ERROR_FILE_NOT_FOUND)
> Temporaries:
>     errorSignal = OSErrorHolder nonexistentSignal
> Context PC = 31
>


>
>
> [ (pas de nom de fichier) (0.2 Ko) ]
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside and Apache, httpd.conf issue

Leandro Perez-2
Thanks Maarten,
Before I read your post, I was able to partially fix my httpd.conf.
I was just missing a "/" before the "$1 [P,L]", so Apache was mapping all "/seaside/*" to "/seaside",
e.g. http://localhost/seaside/go -> mapped to -> http://localhost:7777/seasidego instead of http://localhost:7777/seaside/go 

here is the fixed httpd.conf, each request starting with /seaside/ is mapped to the seaside server.

    NameVirtualHost *:80

    <VirtualHost *:80>
        ServerName localhost
        RewriteEngine On
        ProxyVia Block
        ProxyPreserveHost On
        RewriteRule ^/seaside/(.*)$ http://localhost:7777/seaside/$1 [P,L] # I was missing the last "/" before the "$1 [P,L]"
    </VirtualHost>


The problem I have, now is different.
Requests are being handled by Apache and redirected to the Smalltalk server, but, when submitting forms, I get a page saying "Method not implemented". No problems when browsing, but when it comes to submitting forms, always a "Method not implemented" page.
I didn't have much time to see what is going wrong. Hopefully someone had this problem before and can lend me a hand..
Thanks, greetings.
Leandro



On Tue, May 27, 2008 at 12:20 PM, Maarten MOSTERT <[hidden email]> wrote:

Hi,

Configuring Apache is a real pain job and not so much documented. However I run with the same configuration as you do VW's TinyHttp and Apache 2.061 on a low cost VPN offering sharing many things through Apache.

It might not be perfect but here you go for my httpd.conf.  Don't forget to write ALL the file libraries to your public directory respecting the file structure.

Rgrds,

@+Maarten,


===============================================

<VirtualHost 193.34.17.215:80>

ServerName mydomain.com

ServerAlias www.mydomain.com

RewriteEngine On

RewriteRule ^/$ /index [R]

# DocumentRoot /home/maarten/public_html

# only allow Seaside rewrite rule to fire, when request doesn't match an existing file

# RewriteCond /home/maarten/public_html/%{REQUEST_FILENAME} !-f

# if no file was found, proxy the request to Seaside

# RewriteRule ^/(.*)$ http://localhost:8888/index/ [P,L]

# Set up general proxy properties

ProxyRequests Off

ProxyPreserveHost On

<Proxy *>

Order deny,allow

Allow from none

</Proxy>

# Set up main application URL

<Location /index>

Order deny,allow

Allow from all

# Proxy all requests to /home down to the actual host running Seaside

ProxyPass http://193.34.17.215:8888/index

ProxyPassReverse http://193.34.17.215:8888/index

</Location>

# Additional aliases to serve files normally served by Seaside;

# this is a simple optimization to reduce load on the app server

# by letting Apache do what it does best, serve static files;

# normally in development these directories are served by Seaside

# to keep development environment simpler

Alias /files /home/maarten/public_html/files

Alias /images /home/maarten/public_html/images

# Alias /css /home/maarten/public_html/css

<Directory /home/maarten/public_html>

<Limit GET>

Order allow,deny

Allow from all

</Limit>

</Directory>



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

Re: Seaside and Apache, httpd.conf issue

Edward Stow
On Wed, May 28, 2008 at 9:52 PM, Leandro Perez <[hidden email]> wrote:

> Thanks Maarten,
> Before I read your post, I was able to partially fix my httpd.conf.
> I was just missing a "/" before the "$1 [P,L]", so Apache was mapping all
> "/seaside/*" to "/seaside",
> e.g. http://localhost/seaside/go -> mapped to ->
> http://localhost:7777/seasidego instead of http://localhost:7777/seaside/go
>
> here is the fixed httpd.conf, each request starting with /seaside/ is mapped
> to the seaside server.
>
>     NameVirtualHost *:80
>
>     <VirtualHost *:80>
>         ServerName localhost
>         RewriteEngine On
>         ProxyVia Block
>         ProxyPreserveHost On
>         RewriteRule ^/seaside/(.*)$ http://localhost:7777/seaside/$1 [P,L] #
> I was missing the last "/" before the "$1 [P,L]"
>     </VirtualHost>
>
>
> The problem I have, now is different.
> Requests are being handled by Apache and redirected to the Smalltalk server,
> but, when submitting forms, I get a page saying "Method not implemented". No
> problems when browsing, but when it comes to submitting forms, always a
> "Method not implemented" page.
> I didn't have much time to see what is going wrong. Hopefully someone had
> this problem before and can lend me a hand..

Something that catches me out is failing to enable the subordinate
proxy modules.  Not sure if this is your problem however.
See http://httpd.apache.org/docs/2.0/mod/mod_proxy.html, 2nd paragraph.

--
Edward Stow
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside