mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #170] Support Request: White screen and console errors for web UI #114
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mbomb007 on GitHub (Sep 26, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/170
The issue
I'm trying to replace Mailhog with Mailpit. I installed it using the script.
I followed the steps here for how to enable Mailpit as a service. Honestly, this should be added to the Wiki.
Then, after stopping Mailhog and starting the Mailpit service (which starts successfully) and visiting the UI, I get these errors in the browser console, and I only see a white screen.
I don't know where those files are on the system, or how I need to configure Mailpit or Nginx to get them to load.
Sending mail works (I think). I don't see any errors when I send a test email.
Configuration info
PHP-FPM
The PHP config:
In the above, I basically just replaced
mailhogwithmailpit.Nginx
System info
Other notes
This issue looks similar to this one, but it's not exactly the same: https://github.com/axllent/mailpit/issues/137
@axllent commented on GitHub (Sep 26, 2023):
I see you are routing
/mailpit/to Mailpit via nginx, but did you set the Mailpit webroot to that too when you started it via your service? If not, then try adding a--webroot /mailpit/to the ExecStart command to the existing line and see if that works?I'll definitely consider adding that systemd config to the wiki.
@mbomb007 commented on GitHub (Sep 26, 2023):
I added that and restarted the service. I now get just a simple 404 error from Nginx:
404 page not found.My website is still up, and I don't see any Nginx or PHP log errors. Test emails still seem to be sent fine, both by the website and from CLI. However, I don't know how to fix the UI, and I don't know enough about Nginx proxies to know what's wrong.
If I switch back my settings and start Mailhog, the server still works with Mailhog.
Is there a way to troubleshoot the UI with Nginx or from the CLI?
Mailpit service status:
@axllent commented on GitHub (Sep 26, 2023):
Do you have direct access to the Mailpit server without Nginx? What I mean is, if it is local - can you access Mailpit via
http://localhost:8025/mailpit/or whatever IP address it is? Mailpit appears to be running as expected, and listening on port 1025. On the local machine (assuming you do not have access to Mailpit directly from "outside") should respond tocurl http://localhost:8025/mailpit/@mbomb007 commented on GitHub (Sep 26, 2023):
Ah, yes. That does seem to show the page when I run curl.
@axllent commented on GitHub (Sep 26, 2023):
And I assume that
curl http://localhost:8025/mailpit/dist/app.jsv1.9.2returns a whole bunch of JavaScript code? No need to paste the output of that, but there should be a lot?@mbomb007 commented on GitHub (Sep 26, 2023):
I had to add a missing
?and runcurl http://localhost:8025/mailpit/dist/app.js?v1.9.2, but yes it does.@mbomb007 commented on GitHub (Sep 26, 2023):
So it must be something related to Nginx... but I really don't know what, as my configuration works with Mailhog.
@ulken commented on GitHub (Sep 26, 2023):
I'm not 100 % sure, but I had the same problem earlier today. First missing setting the web root, then 404:ing. My problem was I stripped
/mailpitfrom the URL after the proxy handled it. I think you're doing the same thing. Try appending/mailpittoproxy_pass.@mbomb007 commented on GitHub (Sep 26, 2023):
Yes! @ulken, that fixed it!
@mbomb007 commented on GitHub (Sep 26, 2023):
So basically, something is different between Mailhog and Mailpit with the webroot and how you have to configure the proxy.
@axllent It'd be great if this difference or an example Nginx configuration could include this information and solution. Or it could be added to the troubleshooting section of the Wiki.
@axllent commented on GitHub (Sep 26, 2023):
Thanks for the feedback, and the helpful tip @ulken! Glad it's working, and I'll try remember to add something to the Wiki.
@ulken commented on GitHub (Sep 26, 2023):
Yeah, I was a little surprised by that as well. Grafana for example doesn't work that way.
@mbomb007 commented on GitHub (Sep 26, 2023):
I basically converted to Mailpit because DDEV did so, and then I saw how much greater than Mailhog it is. Thanks for your work to create this wonderful tool!
@Alex4Codes commented on GitHub (Dec 22, 2023):
Please add information about nginx configuration to the documentation
@axllent commented on GitHub (Dec 23, 2023):
@Alex4Codes see https://mailpit.axllent.org/docs/configuration/proxy/