The Jrun4 engine that CF9 used, was priority and could do some really cool things under the hood.
You are going to have to use different ports or different IP addresses under linux, and I may only be pointing out the obvious to you, as a redundancy as my caffeine has not kicked in.
any rate, You posted this
roto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5630/nginx: master
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 400/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 677/sshd: /usr/sbin
tcp6 0 0 :::8080 :::* LISTEN 4888/java
tcp6 0 0 :::22 :::* LISTEN 677/sshd: /usr/sbin
udp 0 0 127.0.0.53:53 0.0.0.0:* 400/systemd-resolve
first thing I notice is that tomcat is not running on IPv4
just so I help you get to where you want to be technically
You want:
Website 1 /footytips/cfm port 80 (lucee tomcat)
Website 2 /footytips/www port 80 (nginx)
As in Linux port allocation is not dynamically βmagicβ like it was in Jrun4 on IIS, what you need to do is bind either site to a second ip or port
in /etc/nginx/sites-enabled
if you do a ls -lt you will have
root@test1:/etc/nginx/sites-enabled# ls -lt
total 4
-rw-r--r-- 1 root root 447 Aug 4 16:20 footytips_com.conf
lrwxrwxrwx 1 root root 39 Aug 4 15:58 default.conf -> /etc/nginx/sites-available/default.conf
if you edit the default.conf you will have
server {
listen 80 default_server;
root /web/default/wwwroot/;
index index.html;
}
change this to
server {
listen www.footytips.com:80 default_server;
/footytips/www
index index.html;
}
now change or or create footytips_cfm.conf
server {
listen footytips.com:80;
server_name footytips.com;
root /footytips/cfm;
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
# specific settings for files ending in suffixes .ico, .css, .js, gif, etc
}
location / {
#proxy_pass http://127.0.0.1:8080/;
include /etc/nginx/lucee-proxy.conf;
}
location ~ \.(cfm|cfml|cfc)$ {
# proxy_pass http://127.0.0.1:8080;
include /etc/nginx/lucee-proxy.conf;
}
}
in the /etc/hosts I have 2 entries, which in DNS you can have cname pointed to either, or never create, really only matters for the context of getting this working vs which stack works better and when
127.0.0.1 www.footytips.com
127.0.0.1 footytips.com
you have in server-xml
<Host name="footytips.com" appBase="webapps">
<Context path="" docBase="/footytips/www" />
<Alias>www.footytips.com</Alias>
I would remove this and let nginx work as the proxy handler