# Standalone Web App with Apache reverse proxy

**URL:** <https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936>\
**Category:** Web\
**Created:** [August 8, 2021, 11:54am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936 "2021-08-08T11:54:53Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [August 12, 2021, 5:40pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/41 "2021-08-12T17:40:12Z")

</div>

In the early days of Web 2.0 I had to manage a CGI setup from Web 1.0. I’m pretty sure I just yanked the perl script and got it up and running. I, unfortunately, don’t remember specifics as I later fully migrated that system to standalone.

If you don’t have a working solution by Saturday, when I may have time, I’ll try to spin up a VM and take a look at Apache’s proxy capabilities for use with Xojo.

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [August 12, 2021, 5:55pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/42 "2021-08-12T17:55:54Z")

</div>

I don’t know if you’ve looked at this one yet, but it may be exactly what you need:

> [@Reverse-Proxy-Server](https://forum.xojo.com/t/reverse-proxy-server/36667/32):
>
> I was finally able to get Xojo Web to work behind a reverse proxy using a path. Thank you community! This is useful for hosting two differnet xojo web instances on one server. WebApp1 can redirect you two WebApp2 using a relative path regardless of the server or client IP/DNS name. In my case, I need WebApp1 to show WebApp2 in an iframe. I could see from running nginx -V the module was already installed. Apparently it is installed on nginx-full and nginx-extra by default. You need to run gzip\_d…

---

<div class="post-metadata">

**Author:** ![Vigia\_Lin](https://forum.xojo.com/letter_avatar_proxy/v4/letter/v/9fc348/32.png) [@Vigia\_Lin](https://forum.xojo.com/u/Vigia_Lin)\
**Post date:** [August 15, 2021, 4:56am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/43 "2021-08-15T04:56:01Z")

</div>

Web 1.0 is available. Web 2.0 is not available.

---

<div class="post-metadata">

**Author:** ![Daniel\_Wilson](https://forum.xojo.com/user_avatar/forum.xojo.com/daniel_wilson/32/283_2.png) [@Daniel\_Wilson](https://forum.xojo.com/u/Daniel_Wilson)\
**Post date:** [August 28, 2021, 11:08pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/44 "2021-08-28T23:08:51Z")

</div>

I have attempted to make this work with web 2. I ALMOST got it a few months ago. I’ll post some config files if I can get it going sometime.

---

<div class="post-metadata">

**Author:** ![OracleCom\_Com](https://forum.xojo.com/user_avatar/forum.xojo.com/oraclecom_com/32/14752_2.png) [@OracleCom\_Com](https://forum.xojo.com/u/OracleCom_Com)\
**Post date:** [July 13, 2023, 9:39am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/45 "2023-07-13T09:39:24Z")

</div>

A bit late but for anyone with the same problem. After 2 days of trying and failures, I’ve figured out how to do it on Apache2, here is my configurations:

```auto
<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "/srv/www/htdocs"

    RewriteEngine On

    RewriteRule ^/application(.*)$ http://127.0.0.1:9000/$1 [P]

    RewriteCond %{HTTP_REFERER} ^https?://[^/]+/application
    RewriteRule ^(?!/application)(.*)$ http://127.0.0.1:9000$1 [P]
</VirtualHost>

```

And remember to enable mod\_rewrite with command: `sudo a2enmod rewrite` then restart apache

After that, accessing localhost/application results the same as [http://127.0.0.1:9000](http://127.0.0.1:9000) without any issues with loading assets.

---

<div class="post-metadata">

**Author:** ![Giacomo\_Bernardi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@Giacomo\_Bernardi](https://forum.xojo.com/u/Giacomo_Bernardi)\
**Post date:** [July 14, 2023, 5:44pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/46 "2023-07-14T17:44:10Z")

</div>

@OracleCom_Com thank you for your contribution.  
it seems to me a very interesting solution.  
do you think it can also be adapted to a web1 cgi application?  
I tried it and it doesn’t seem to work (with cgi).

---

<div class="post-metadata">

**Author:** ![Vigia\_Lin](https://forum.xojo.com/letter_avatar_proxy/v4/letter/v/9fc348/32.png) [@Vigia\_Lin](https://forum.xojo.com/u/Vigia_Lin)\
**Post date:** [July 15, 2023, 10:37am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/47 "2023-07-15T10:37:04Z")

</div>

Is this used for web 1.0 or web 2.0?  
I failed to use it on web 2.0

---

<div class="post-metadata">

**Author:** ![Giacomo\_Bernardi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@Giacomo\_Bernardi](https://forum.xojo.com/u/Giacomo_Bernardi)\
**Post date:** [July 15, 2023, 10:54am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/49 "2023-07-15T10:54:13Z")

</div>

are you sure?  
if I am not wrong, it works with web2.  
I also wanted to try with a web1 cgi app, but it didn’t work.  
that is why I was asking if the solution is also adaptable to web1 cgi

---

<div class="post-metadata">

**Author:** ![Greg\_O](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o/32/22785_2.png) [@Greg\_O](https://forum.xojo.com/u/Greg_O)\
**Post date:** [July 15, 2023, 11:22am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/50 "2023-07-15T11:22:37Z")

</div>

Web 1 does not have to be CGI though. If you build as standalone, it should work just fine.

---

<div class="post-metadata">

**Author:** ![Vigia\_Lin](https://forum.xojo.com/letter_avatar_proxy/v4/letter/v/9fc348/32.png) [@Vigia\_Lin](https://forum.xojo.com/u/Vigia_Lin)\
**Post date:** [July 15, 2023, 11:24am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/51 "2023-07-15T11:24:54Z")

</div>

You can use it now, I made a mistake

---

<div class="post-metadata">

**Author:** ![Giacomo\_Bernardi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@Giacomo\_Bernardi](https://forum.xojo.com/u/Giacomo_Bernardi)\
**Post date:** [July 15, 2023, 1:39pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/52 "2023-07-15T13:39:52Z")

</div>

Thanks to @OracleCom_Com’s remarkable contribution, this topic (which was discussed at length in the past) has now been brought back to the forefront, and with a brilliant solution.

I believe Xojo Inc. should officially state whether @OracleCom_Com’s configuration is the ultimate solution for using subdirectories with “Web 2” applications on Apache.

Now, I don’t know about other people, but I will NEVER switch to “Web 2” unless I can use subdirectories, with the assurance that they will be supported for a long time by Xojo Inc.

---

<div class="post-metadata">

**Author:** ![Gabriel\_L](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/a3d4f5/32.png) [@Gabriel\_L](https://forum.xojo.com/u/Gabriel_L)\
**Post date:** [July 15, 2023, 9:30pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/53 "2023-07-15T21:30:12Z")

</div>

You can use it. It works.

---

<div class="post-metadata">

**Author:** ![Giacomo\_Bernardi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@Giacomo\_Bernardi](https://forum.xojo.com/u/Giacomo_Bernardi)\
**Post date:** [July 16, 2023, 5:54am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/54 "2023-07-16T05:54:20Z")

</div>

if you answered me, know that I tried shortly after seeing the configuration proposed by @OracleCom_Com.  
so I know that it works.  
now, it is crucial for me that Xojo Inc. approve @OracleCom_Com’s configuration (or another one) to allow the use of subdirectories and give assurances for the future.  
this concept applies to other issues as well.  
if Xojo Inc. does not give assurance of stability, it is definitely not advisable starting new projects or converting “Web 1” projects.  
I have not done so far and will not do so.  
there are already too many cases of developers struggling with the transition, who have abandoned Xojo.

P.S. I hope Xojo Inc. will state its position on this. if there is silence instead, it will be clearer than a thousand words.

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [July 16, 2023, 8:11am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/55 "2023-07-16T08:11:27Z")

</div>

What do you expect them to say? This is an Apache/Nginx issue, not a Xojo issue. This falls outside of what Xojo controls.

---

<div class="post-metadata">

**Author:** ![Gabriel\_L](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/a3d4f5/32.png) [@Gabriel\_L](https://forum.xojo.com/u/Gabriel_L)\
**Post date:** [July 16, 2023, 9:11am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/56 "2023-07-16T09:11:21Z")

</div>

Welll, it’s Xojo’s issue also, kinda…  
You see, they use the wrong pathing format for required assets in the source code of the webpage.  
For example:  
Currently in Xojo: “\<link type=“text/css” href=”/framework/summernote.css" ← this denotes the summernote.css file should be found under [example.com/framework/summernote.css](http://example.com/framework/summernote.css) even if you place the webapp under a subdomain

Correct way: "\<link type=“text/css” href=“framework/summernote.css”

---

<div class="post-metadata">

**Author:** ![Giacomo\_Bernardi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@Giacomo\_Bernardi](https://forum.xojo.com/u/Giacomo_Bernardi)\
**Post date:** [July 16, 2023, 10:06am UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/57 "2023-07-16T10:06:11Z")

</div>

until a few days ago, no one had a solution.  
you can’t use subdirectories with “Web 2”. that’s it.  
now someone finds a possible solution.  
the Xojo applications don’t run in the stratosphere but within environments such as Windows, Linux, macOS and even Apache, Nginx, etc., so it is appropriate for Xojo Inc. to state whether the @OracleCom_Com’s solution for Apache2 is usable in production, now and in the future, long term.  
otherwise we are still wasting time, even in this reborn discussion.  
after 2-3 years of denials, only a madman would start a “Web 2” project without any reassurance from Xojo Inc.

---

<div class="post-metadata">

**Author:** ![Vigia\_Lin](https://forum.xojo.com/letter_avatar_proxy/v4/letter/v/9fc348/32.png) [@Vigia\_Lin](https://forum.xojo.com/u/Vigia_Lin)\
**Post date:** [July 16, 2023, 12:09pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/58 "2023-07-16T12:09:49Z")

</div>

Xojo’s web1 and web2 only run in a certain mode, and now the directory proxy in this mode has been resolved through Apache’s rewrite method. The main thing is still the method, which cannot give any promises. What if the rewrite method changes in the future?

---

<div class="post-metadata">

**Author:** ![Giacomo\_Bernardi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/g/9dc877/32.png) [@Giacomo\_Bernardi](https://forum.xojo.com/u/Giacomo_Bernardi)\
**Post date:** [July 16, 2023, 1:05pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/59 "2023-07-16T13:05:08Z")

</div>

I agree.  
My knowledge of Apache is not extensive, but I believe that the configuration proposed by @OracleCom_Com works today and will work in the future (Apache side).  
That said, I think Xojo Inc. needs to say IF that configuration works today and IF that configuration will work in the future (Xojo side).  
Simply.

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [July 16, 2023, 3:09pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/60 "2023-07-16T15:09:27Z")

</div>

Do you know if there is an [Issue](https://xojo.com/issues) about this?

If doing this change can help users have apps on subdirectories without breaking something, they can review and implement the change.

---

<div class="post-metadata">

**Author:** ![Ricardo\_Cruz](https://forum.xojo.com/user_avatar/forum.xojo.com/ricardo_cruz/32/7852_2.png) [@Ricardo\_Cruz](https://forum.xojo.com/u/Ricardo_Cruz)\
**Post date:** [July 16, 2023, 4:12pm UTC](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936/61 "2023-07-16T16:12:27Z")

</div>

I couldn’t find any related Feature Request for deploying in subdirectories, can you please open one @Giacomo_Bernardi so others can also upvote?

[Previous page](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936.md?page=2)

[Next page](https://forum.xojo.com/t/standalone-web-app-with-apache-reverse-proxy/64936.md?page=4)
