Mailing List Archive

loading shop.example.com in www.test.com/shop/
I was wondering if it is even possible to publish an existing shop hosted on the subdomain shop.example.com and show it as a 'folder' in www.test.com/shop. Will I have problems with browsers (cookies?). I don't want to resolve this on the file system because both have different uid/gids on files.
B?KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB??[??X???X?KK[XZ[?\?\??][??X???X?P ?\X?K???B???Y][?[??[X[??K[XZ[?\?\??Z[ ?\X?K???B
Re: loading shop.example.com in www.test.com/shop/ [ In reply to ]
El jue, 3 ago 2023 a las 22:33, Marc (<Marc@f1-outsourcing.eu>) escribió:

> I was wondering if it is even possible to publish an existing shop hosted
> on the subdomain shop.example.com and show it as a 'folder' in
> www.test.com/shop. Will I have problems with browsers (cookies?). I don't
> want to resolve this on the file system because both have different
> uid/gids on files.
>


You can just Alias /shop/ /path/to/documentrootof/shop.example.com/

From the http server side, there are a few ways to do it, Alias, internal
redirects, reverse proxy.

As per "cookies" that's another thing entirely related to the application
not the http server itself.

If you need you can try to tweak them with the help of mod_headers module
or perhaps reverse proxy from one place to another and try to tweak with
mod_proxy directives ProxyPassReverseCookieDomain and
PRoxyPassReverseCookiePath. What it is for sure is you have low chances of
getting away without paying close attention to the behaviour from your
application.


--
Daniel Ferradal
HTTPD Project
#httpd help at Libera.Chat
RE: loading shop.example.com in www.test.com/shop/ [ In reply to ]
>
>
> I was wondering if it is even possible to publish an existing shop
> hosted on the subdomain shop.example.com <http://shop.example.com> and
> show it as a 'folder' in www.test.com/shop <http://www.test.com/shop> .
> Will I have problems with browsers (cookies?). I don't want to resolve
> this on the file system because both have different uid/gids on files.
>
>
>
>
> You can just Alias /shop/ /path/to/documentrootof/shop.example.com/
> <http://shop.example.com/>

Yes I did not expect this to work because of file system permissions and different php version.

> From the http server side, there are a few ways to do it, Alias,
> internal redirects, reverse proxy.
>

Currently I am having

24 SSLProxyEngine On
25 SSLProxyVerify none
26 SSLProxyCheckPeerCN off
27 SSLProxyCheckPeerName off
28 SSLProxyCheckPeerExpire off
29 <Location /shop/>
30 ProxyPass "https://shop.example.com/"
31 ProxyPassReverse "https://shop.example.com/"
32
33 Options +Indexes +ExecCGI +FollowSymLinks -MultiViews
34 Order Allow,Deny
35 Allow from all
36 </Location>
37

Home page loads fine however, I have static urls in html pages to https://shop.example.com/ is it possible to have those rewriten to / relative urls?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: loading shop.example.com in www.test.com/shop/ [ In reply to ]
El vie, 4 ago 2023 a las 15:19, Marc (<Marc@f1-outsourcing.eu>) escribió:

>
> 29 <Location /shop/>
> 30 ProxyPass "https://shop.example.com/"
> 31 ProxyPassReverse "https://shop.example.com/"
> 32
> 33 Options +Indexes +ExecCGI +FollowSymLinks -MultiViews
> 34 Order Allow,Deny
> 35 Allow from all
> 36 </Location>
> 37
>
> Home page loads fine however, I have static urls in html pages to
> https://shop.example.com/ is it possible to have those rewriten to /
> relative urls?
>

You can rewrite anything yes, but the simpler you configure it the better
in the long run.

On another note, you should not still be using Order/Allow/Deny directives,
those are deprecated.

About the whole thing:

I would just create two virtualhosts with their
appropriate documentroots and configurations in virtualhost, that would be
the simplest, less painful, more straightforward way to do it generally.


--
Daniel Ferradal
HTTPD Project
#httpd help at Libera.Chat