Topic: Nginx virtual host issue
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 2020041601
- Deployed with iRedMail Easy or the downloadable installer? iRedMail easy
- Linux/BSD distribution name and version: Centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,
I'm having issue trying to setup virtual host with nginx. i have done the ".conf" setup in "/etc/nginx/sites-available" & the respective linking to "/etc/nginx/sites-enabled" .
this is content of example.com.conf:
-----------------------------------------------------------------------------------------
server {
listen 80;
listen 443;
server_name example.com www.example.com;
location / {
root /var/www/example;
index index.html index.htm;
try_files $uri $uri/ =404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
----------------------------------------------------------------------------
the issues i need to clarify:
1. is this the correct contents for the ".conf" file?
2. is this the correct location to put the ".conf" file
3. when i use https:// to access the site, it loads properly. but when i omit the https, it loads the page minus the css stylesheet. What am i doing wrong?
hopefully i am clear with what i'm trying to say, thank you.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.