Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Issue with docker deployment: Apache proxy returning 404 error

25 views
Skip to first unread message

Filipe Cunha

unread,
May 2, 2024, 7:40:22 PM5/2/24
to inception-users
Hi everyone,

I want to deploy a Docker image of Inception on my server, at example.com/inception. As port 8080 is already taken, I redirected the container port to 8081:8080. Then, I created a reverse proxy in the Apache config file:

<VirtualHost *:80>

ProxyPreserveHost On

ProxyPass /inception http://localhost:8081
ProxyPassReverse /inception http://localhost:8081
...
</VirtualHost>

I also created a settings.properties file and added the following:

wicket.core.csrf.accepted-origins[0]=example.com
wicket.core.csrf.accepted-origins[1]=https://example.com

However, when accessing example.com/inception, the website returns a 404 error and redirects me to example.com/login.php instead of example.com/inception/login.php. When I manually change the URL to example.com/inception/login.php, the Inception login page loads. However, when I attempt to login, it redirects me to example.com (another application) instead of example.com/inception.

I also tried adding the following line to the settings.properties file, but still no luck:
server.servlet.context-path=/inception


I suspect that the issue lies in how the application handles redirects, possibly ignoring the /inception path prefix. Any insights or suggestions would be greatly appreciated!

Thank you in advance for your help!

Richard Eckart de Castilho

unread,
May 3, 2024, 12:49:55 AM5/3/24
to inception-users
Hi Filipe,

> On 3. May 2024, at 01:40, Filipe Cunha <ryz...@gmail.com> wrote:
>
> I also tried adding the following line to the settings.properties file, but still no luck:
> server.servlet.context-path=/inception

Have you checked if the settings file is actually loaded? There should be a line like this in the console/log:

```
INFO [main] [SYSTEM] boot - Settings: /path/to/inception/settings.yml (file exists)
```

Also, later, there should be a line like this:

```
[SYSTEM] boot - You can now access INCEpTION at http://localhost:8080/inception
```

In that last line, does it show `/inception` at the end or not?

Cheers,

-- Richard

Filipe Cunha

unread,
May 3, 2024, 5:38:41 AM5/3/24
to inception-users
Yes, both lines appear when starting inception.
Found the issue after some struggle: the proxy should have the /inception prefix.

<VirtualHost *:80>

ProxyPreserveHost On

ProxyPass /inception http://localhost:8081/inception
ProxyPassReverse /inception http://localhost:8081/inception
...
</VirtualHost>

It works now. Thank you, Richard!

- Fillipe

Filipe Cunha

unread,
May 24, 2024, 1:10:50 PM5/24/24
to inception-users
Hi, it seems I'm having another problem that might be related to connectivity configurations. 
When I try to export my project, nothing happens, there is no loading bar and I cannot download my project.
My console is returning some errors:

Captura de ecrã 2024-05-24 180544.png

I went to the administration tab and found the following:


Captura de ecrã 2024-05-24 180241.jpg
Here you have the apache virtual host:

Captura de ecrã 2024-05-24 180906.png


Any ideas?
Thank you,

Filipe

Richard Eckart de Castilho

unread,
May 24, 2024, 4:19:25 PM5/24/24
to incepti...@googlegroups.com
Hi,

in the ProxyPassReverse, you likely have to use https for the external URL:

ProxyPassReverse /inception https://foo.bar.com/inception

Also, make sure to add the CSRF settings:

https://inception-project.github.io/releases/32.2/docs/admin-guide.html#_csrf_protection

Once done, check the Administration page again if the situation has improved.

-- Richard

Filipe Cunha

unread,
May 24, 2024, 4:49:09 PM5/24/24
to inception-users

I had already configured my CSRF. Here you have my settings.properties

Captura de ecrã 2024-05-24 214044.png


I also changed the ProxyPassReverse as you requested using the external url:
 Captura de ecrã 2024-05-24 214458.png

Then I restarted the Apache server, but the errors displayed on the inception administration page remained the same :/
Any other ideas? 

Filipe

Filipe Cunha

unread,
May 24, 2024, 9:14:41 PM5/24/24
to inception-users
I was able to fix the CSRF error by correcting the settings.properties files. However, the other two errors remain. The browser console is still returning the WebSocket error.  I tried several different Apache configurations but had no luck. I'm really lost here... 

I also noticed that, even though the project export button won't allow me to download the project file, when I press it I get the following logs inception terminal: 

Captura de ecrã 2024-05-25 021149.png

It seems that the server is doing something, but then nothing happens on the browser :/
Reply all
Reply to author
Forward
0 new messages