foundeo / ubuntu-nginx-lucee

Script for standing up a Lucee server using nginx and Tomcat on Ubuntu
Apache License 2.0
86 stars 47 forks source link

Custom web folder #18

Closed malpaso closed 6 years ago

malpaso commented 7 years ago

Not sure if I'm doing anything wrong but I cannot get Lucee to process CF files from my custom web folder. It continually wants to look in /webapps/ROOT of tomcat8!

Page /index.cfm [/var/lib/tomcat8/webapps/ROOT/index.cfm] not found

I literally copy verbatim the example.com conf file for nginx

Would updating the Lucee version affect what's been initially configured in web.xml ?

server { listen 80; server_name mywebsite.com; root /web/mywebsite.com/; set $lucee_context "mywebsite.com"; include lucee.conf; }

pfreitag commented 7 years ago

Hi @malpaso

I made a bunch of updates yesterday to this repository are you using the latest?

pfreitag commented 7 years ago

Make sure your /etc/tomcat8/server.xml looks like this: https://github.com/foundeo/ubuntu-nginx-lucee/blob/master/etc/tomcat8/server.xml

And your /etc/tomcat8/web.xml looks like this: https://github.com/foundeo/ubuntu-nginx-lucee/blob/master/etc/tomcat8/web.xml

malpaso commented 7 years ago

Thanks @pfreitag , great job on these scripts by the way :)

I am using the latest (post server / web.xml changes) repository.

I can't explain why it is recognizing my domain from the nginx conf but ignoring the root directive. Perhaps this is not being passed to tomcat8 correctly?

I'm running Ubuntu 16.10 x64

I'm going to rebuild my droplet and run the scripts on Ubuntu 16.04 x64

malpaso commented 7 years ago

Hi @pfreitag

I rebuilt my droplet using Ubuntu 16.04 and same problem.

Everything works until I attempt to place a .cfm file in my custom folder and then the following:

Page /index.cfm [/var/lib/tomcat8/webapps/ROOT/index.cfm] not found

I'll keep digging.

malpaso commented 7 years ago

@pfreitag Good news, got it working by adding the following in server.xml (inside the HOST element that has the mod_cfml valve)

<Context path="" docBase="/usr/share/nginx/html/" />

Rebooted and voila my .cfm file is served from the custom web folder