Topic: Nginx serving custom website
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer? download
- Linux/BSD distribution name and version: Ubuntu 18.04.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I'm moving from my old webserver/mail-setup to iRedMail. So I'm trying to host a custom website with the nginx conifgured by iRedMail. Nothing special, just some static html/css/javascript.
While the site works perfectly on a default nginx on Ubuntu, it doesn't on my iRedMail server. No pic, no css is loaded, just the pure html-file.
The directory-structure of the site is very simple, too:
/var/www/<site>
/var/www/<site>/css
/var/www/<site>/images
The css and the pics are accessible and shown if addressed directly in the browser.
My block-conifguration:
server {
# Listen on ipv4
listen 80;
listen [::]:80;
server_name <site>;
root /var/www/<site>;
index index.html;
location / {
try_files $uri /index.html;
}
No error-messages in the error-log.
What nginx-option is missing so the website will be shown correctly?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.