404 Error - Fresh Install Nginx Proxy Apache Server Ubuntu 18.04 #2774

Closed
opened 2026-02-05 05:09:17 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @jehboi on GitHub (May 3, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

After installing the BookStack on my development server (same stack as production), I attempted an install on production. Everything seemingly went smoothly - just like dev - but when I finally went to the site, it returns an Apache 404.

I have validated my Nginx configuration and Apache virtual host configuration and it all mirrors dev and I can find no discernible difference. I have validated permissions as well. I can access static resources (e.g. user_avatar.png).

I have searched similar issues but none have yielded a solution. Any assistance is appreciated!

Exact BookStack Version

v22.04

Log Content

No response

PHP Version

7.4

Hosting Environment

Ubuntu 18.04 (Bionic), Nginx Reverse Proxy (forced HTTPS; LetsEncrypt), Apache 2

Originally created by @jehboi on GitHub (May 3, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario After installing the BookStack on my development server (same stack as production), I attempted an install on production. Everything seemingly went smoothly - just like dev - but when I finally went to the site, it returns an Apache 404. I have validated my Nginx configuration and Apache virtual host configuration and it all mirrors dev and I can find no discernible difference. I have validated permissions as well. I can access static resources (e.g. user_avatar.png). I have searched similar issues but none have yielded a solution. Any assistance is appreciated! ### Exact BookStack Version v22.04 ### Log Content _No response_ ### PHP Version 7.4 ### Hosting Environment Ubuntu 18.04 (Bionic), Nginx Reverse Proxy (forced HTTPS; LetsEncrypt), Apache 2
OVERLORD added the 🐕 Support label 2026-02-05 05:09:17 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 4, 2022):

Hi @jehboi,

Based on the following comment:

I can access static resources (e.g. user_avatar.png).

It would seem to me that PHP might not be enabled on Apache, might be worth checking that mod-php is enabled and active at that layer.

The usage of both Apache and Nginx do complicate things here, if not the above it might be worth ensuring requests are properly hitting the apache layer by checking apache logs and/or stopping apache to confirm the error browser response changes.

@ssddanbrown commented on GitHub (May 4, 2022): Hi @jehboi, Based on the following comment: > I can access static resources (e.g. user_avatar.png). It would seem to me that PHP might not be enabled on Apache, might be worth checking that mod-php is enabled and active at that layer. The usage of both Apache and Nginx do complicate things here, if not the above it might be worth ensuring requests are properly hitting the apache layer by checking apache logs and/or stopping apache to confirm the error browser response changes.
Author
Owner

@jehboi commented on GitHub (May 4, 2022):

Thanks @ssddanbrown - I verified that PHP is indeed enabled and functioning. If I replace public/index.php with an echo 'Hello World' file it is served correctly.

Scanning configurations for both dev and prod has yielded nothing, so I have reconfigured Nginx to serve BookStack directly. This works. So it's something about the proxy setup (only in prod) that BookStack doesn't like.

There is nothing in the logs. I will try some other things but at least I found a short term solution.

@jehboi commented on GitHub (May 4, 2022): Thanks @ssddanbrown - I verified that PHP is indeed enabled and functioning. If I replace public/index.php with an echo 'Hello World' file it is served correctly. Scanning configurations for both dev and prod has yielded nothing, so I have reconfigured Nginx to serve BookStack directly. This works. So it's something about the proxy setup (only in prod) that BookStack doesn't like. There is nothing in the logs. I will try some other things but at least I found a short term solution.
Author
Owner

@ssddanbrown commented on GitHub (May 4, 2022):

Okay, sounds like it might have been lack of URL rewriting then? Potential mod_rewrite not being active?

Since you've got things running though I'll close this off but feel free to update if you need further help/guidance.

@ssddanbrown commented on GitHub (May 4, 2022): Okay, sounds like it might have been lack of URL rewriting then? Potential `mod_rewrite` not being active? Since you've got things running though I'll close this off but feel free to update if you need further help/guidance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2774