[GH-ISSUE #1693] new install getting 404 on static content #1331

Closed
opened 2026-02-27 11:16:33 +03:00 by kerem · 5 comments
Owner

Originally created by @tonyguadagno on GitHub (Mar 7, 2019).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1693

hi, i just installed a brand new modoboa on a fully patched centos 7 server. i used the automatic install which completed without error. I am trying to get into the admin gui but the css and images are not painting....they are throwing 404's.....

I would appreciate any help in figuring out how to get this working....

thanks in advance!

Originally created by @tonyguadagno on GitHub (Mar 7, 2019). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1693 hi, i just installed a brand new modoboa on a fully patched centos 7 server. i used the automatic install which completed without error. I am trying to get into the admin gui but the css and images are not painting....they are throwing 404's..... I would appreciate any help in figuring out how to get this working.... thanks in advance!
kerem closed this issue 2026-02-27 11:16:33 +03:00
Author
Owner

@tonyguadagno commented on GitHub (Mar 7, 2019):

ok, so i found the nginx logs and see this....why is there a permission issue?

2019/03/07 10:15:25 [crit] 16967#0: *13 stat() "/srv/modoboa/instance/sitestatic/css/modoboa.png" failed (13: Permission denied), client: 192.168.168.205, server: mail.ffusa.com, request: "GET /sitestatic/css/modoboa.png HTTP/1.1", host: "mail.ffusa.com", referrer: "https://mail.ffusa.com/accounts/login/?next=/"

<!-- gh-comment-id:470571375 --> @tonyguadagno commented on GitHub (Mar 7, 2019): ok, so i found the nginx logs and see this....why is there a permission issue? `2019/03/07 10:15:25 [crit] 16967#0: *13 stat() "/srv/modoboa/instance/sitestatic/css/modoboa.png" failed (13: Permission denied), client: 192.168.168.205, server: mail.ffusa.com, request: "GET /sitestatic/css/modoboa.png HTTP/1.1", host: "mail.ffusa.com", referrer: "https://mail.ffusa.com/accounts/login/?next=/" `
Author
Owner

@tonyguadagno commented on GitHub (Mar 7, 2019):

ok, so more poking around shows me that this is an selinux issue.....and i think this is caused by the fact that modoboa chose to put its web home directory in a non standard path (/srv/modoboa/instance). i was able to find these commands and it seems to have fixed the issue...it seems these should be included in the installer?

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/srv/modoboa/instance(/.*)?"
sudo restorecon -Rv /srv/modoboa/instance
<!-- gh-comment-id:470588647 --> @tonyguadagno commented on GitHub (Mar 7, 2019): ok, so more poking around shows me that this is an selinux issue.....and i think this is caused by the fact that modoboa chose to put its web home directory in a non standard path (/srv/modoboa/instance). i was able to find these commands and it seems to have fixed the issue...it seems these should be included in the installer? ``` sudo semanage fcontext -a -t httpd_sys_rw_content_t "/srv/modoboa/instance(/.*)?" sudo restorecon -Rv /srv/modoboa/instance ```
Author
Owner

@tonyguadagno commented on GitHub (Mar 7, 2019):

update: as it turns out, there are MANY other SELinux violations that get in the way of this working right....regrettable, i had to disable selinux. I don't like doing this, but i don't have enough knowledge to fix all of it....
If anyone knows all the SELinux changes that need to happen, I would appreciate it, it would be nice if the install script could take care of this.

thanks

<!-- gh-comment-id:470670822 --> @tonyguadagno commented on GitHub (Mar 7, 2019): update: as it turns out, there are MANY other SELinux violations that get in the way of this working right....regrettable, i had to disable selinux. I don't like doing this, but i don't have enough knowledge to fix all of it.... If anyone knows all the SELinux changes that need to happen, I would appreciate it, it would be nice if the install script could take care of this. thanks
Author
Owner

@cremesk commented on GitHub (Mar 7, 2019):

you can check this: Issue 198

<!-- gh-comment-id:470674423 --> @cremesk commented on GitHub (Mar 7, 2019): you can check this: [Issue 198](https://github.com/modoboa/modoboa-installer/issues/198)
Author
Owner

@tonyguadagno commented on GitHub (Mar 7, 2019):

cremesk...GREAT, THANKS, I will try this!

<!-- gh-comment-id:470676959 --> @tonyguadagno commented on GitHub (Mar 7, 2019): cremesk...GREAT, THANKS, I will try this!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1331
No description provided.