Hi all,
this should be simple, but I couldn't get it working, so I am here. I am using
nginx on my server since I have multiple domains. I am trying to pass all the
requests to this particular instance to the Racket server, which according to
the docs works like this for Apache:
RewriteEngine on
RewriteRule ^(.*)$ http://localhost:8080/$1 [P,NE]
According to docs I have found elsewhere, the nginx equivalent of that (without
the flags at the end, which I have no clue how to do) is:
server {
listen 80;
server_name my-site.com www.my-site.com
location / {
try_files proxy_pass http:///127.0.0.1:8080;
}
My racket server should be listening to localhost at port 8080, since I start
it as follows:
(serve/servlet start #:log-file (build-path (string-append "logs/" date-string
"server.logs"))
#:port 8080
;#:listen-ip #f
#:servlet-path "/"
#:servlet-regexp #rx""
#:launch-browser? #t
#:extra-files-paths (list (build-path "htdocs"))
#:servlet-responder my-error-responder)
I have tested that the Racket server works when listening on port 80 and to all
ips (turning off my other domains for that test); nginx also works with plain
HTML in the folders where it is supposed to look, so at least it's running and
functional for Wordpress sites. Finally, I don't think the problem is with the
[P, NE] flags either, since there is no direct redirect. And the NE flag should
not be a problem for the pages I am testing, since the URL is simply
my-site.com/home.
Yet, all I get is nginx's error page.
Has anyone experience with setting this up and getting it to work - and what
are the precise configurations in nginx you used?
Thanks,
Marc
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.