Reverse proxy one domain

Aleksandar Lazic al-nginx at none.at
Sat Apr 27 16:22:42 UTC 2019


Hi.

Am 25.04.2019 um 15:16 schrieb mrodrigom:
> Hi.
> I have one URL for all my websites, applications and so.
> Let's say it's system.mydomain.com. Most of my websites is Apache + PHP and
> the applications is Tomcat. So far so good, no problem there.
> 
> My nginx config that's working for everything else:
> 
> server {
>         listen 80;
>         server_name system.mydomain.com;
>         ....................
>         location /app1 {
>                 return 301 https://$host$request_uri;
>         }
> }
> server {
>         listen 443 ssl;
>         server_name system.mydomain.com;
>         ....................
>         location /app1 {
>                 proxy_pass              http://app1.mydomain.com;
>         }
> }
> upstream app1.mydomain.com {
>         server          SERVER_IP_HERE:8081        fail_timeout=60;
> }
> 
> Ok, my problem is when I have Alfresco for example on the backend. Alfresco
> responds on (fictional IP) "http://192.168.0.10/share".
> I need to acess my nginx reverse proxy (another machine in front of
> Alfresco) on the URL: "http://system.mydomain.com/alfresco" and it should
> consume "http://192.168.0.10/share".
> In my configuration above, the error is that when I acess
> "http://system.mydomain.com/alfresco" it will consume
> "http://192.168.0.10/alfresco".
> How can I configure this to work? Rewrite?

Looks like you would like to have ProxyPassReverse which does not exists
according to this wiki. Maybe it changed in the current nginx version.

https://www.nginx.com/resources/wiki/start/topics/examples/likeapache/


Why don't configuring Alfresco for reverse proxy setup?

http://docs.alfresco.com/6.1/tasks/configure-ssl-prod.html

In this post are some answers which links to a possible nginx solution.

https://community.alfresco.com/thread/232617-configure-reverse-proxy-for-alfresco-community-52-windows

Regards
Aleks


More information about the nginx mailing list