Hi,
This is my first server block. The filename lp.cce.academy, and the file content is as follows:
/etc/nginx/sites-available # cat lt.cce.academy
server {
listen 80;
listen [::]:80;
root /var/www/cce/leantime/public;
index index.html index.htm index.php;
server_name lt.cce.academy;
location / {
try_files $uri $uri/ =404;
}
}
my server is debian 11
I have previously installed apache2, but has disabled it,
systemctl status apache2, shows it is loaded, inactive (dead).
systemctl status nginx, shows it is active and running
At chrome browser from my remote laptop,
I keyed in "my IP address", it display nginx default home landing page. Which is correct.
when I keyed in "cce.academy" my domain name, it also display the nginx default home landing page.
but when I keyed in "lt.cce.academy", as my subdomain name, the leantime application is not running, instead, it jump to my laptop file download prompt, asking me to save a file "Download" to my downloads directory local drive.
I tested this subdomain name is working fine in apache2, it launched the application leantime as expected.
the directory listing of /var/www/cce/leantime/public # ls
backup.php fonts js robots.txt tmp
css images less SMTP.php userfiles
download.php index.php null theme
What is wrong with my configuration at lt.cce.academy file at the /etc/nginx/sites-available? I have created a symbolic link at the /etc/nginx/sites-enabled directory
of this configuration file.
Thank you.