Dynamic referenceURL

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
debridat1
Posts: 12
Joined: Wed Jan 22, 2020 2:23 pm
Location: Italy

Dynamic referenceURL

Post by debridat1 » Fri Oct 02, 2020 11:53 am

Hi,

I use phpmyfaq 2.9.13 and it works very well within an intranet.
Now I need to make it accessible also from the internet.
To make the site accessible from the internet, I must necessarily use a different address from the internal one with a reverse proxy.

The problem is on the referenceURL: I reach the site from the internet, but when I start browsing it I have redirects with the internal address of the site and images are not loaded
Is it possible to configure a dynamic referenceURL?

Tnk

Thorsten
Posts: 15150
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Dynamic referenceURL

Post by Thorsten » Sat Oct 03, 2020 8:52 am

Hi,

you can use the local IP as phpMyFAQ should recognize you're running a reverse proxy.

We're using the HTTP_X_FORWARDED_FOR header to rewrite the URLs.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

debridat1
Posts: 12
Joined: Wed Jan 22, 2020 2:23 pm
Location: Italy

Re: Dynamic referenceURL

Post by debridat1 » Wed Oct 07, 2020 5:17 pm

Thorsten wrote:
Sat Oct 03, 2020 8:52 am
Hi,

you can use the local IP as phpMyFAQ should recognize you're running a reverse proxy.

We're using the HTTP_X_FORWARDED_FOR header to rewrite the URLs.

bye
Thorsten

Thorsten thanks for the reply.
I don't understand how to use HTTP_X_FORWARDED_FOR to rewrite URLs; do I have to act only on the web server (I use Apache)? Or should I also modify PhpMyFaq?

Could you give me some more details?

thank you so much

Thorsten
Posts: 15150
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Dynamic referenceURL

Post by Thorsten » Sat Oct 10, 2020 4:23 pm

Hi,

I thought again about your problem. I think you should use the external hostname in phpMyFAQ.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply