[Seaside] nginx virtual hosting and seaside
Jupiter Jones
jupiter.jones at mail.com
Tue Mar 31 08:15:08 UTC 2015
Hi All,
i’m hoping someone has attempted this before to save me having to learn too much about nginx :)
I have multiple URL’s:
www.site1.com <http://www.site1.com/>
www.site2.com <http://www.site2.com/>
etc.
and multiple applications running in seaside:
www.site1.com/Site1App <http://www.site1.com/Site1App>
www.site2.com/Site2App <http://www.site2.com/Site2App>
etc.
This is the bit I don’t know about… Ideally I’d like the urls to map directly to the Seaside application. i.e.
www.site1.com <http://www.site1.com/> serves the application at /Site1App
www.site2.com <http://www.site2.com/> serves the application at /Site2App
etc.
in my nginx.conf I have:
upstream seaside {
server 127.0.0.1:8383;
}
server {
listen 80;
server_name site1.com <http://site1.com/> www.site1.com <http://www.site1.com/>;
root /dev/null;
location / {
proxy_pass http://seaside;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name site2.com <http://site1.com/> www.site2.com <http://www.site1.com/>;
root /dev/null;
location / {
proxy_pass http://seaside;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
etc.
Does anyone know the missing piece of the puzzle?
Thanks in advance for any advice.
Cheers,
Jupiter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150331/57e00f7e/attachment.htm
More information about the seaside
mailing list