Hi all, this is an answer to a reply deep down in another thread, but I thought it would be easier to find if I posted a separate topic.
Someone asked how to get Cardo running from "inside" NextCloud. Which really would be the same as getting it running on any web server, but it's not an obvious answer.
I run Node as usual to get TW up and running, but then I redirect NGINX to it. You can do the same with Apache, just adapt the code below.
NGINX uses small config files at /etc/nginx/sites-available/yourwebsitename.conf which then get linked to /etc/nginx/sites-enabled/yourwebsitename.conf (or unlinked) to activate that config.
My config for a TW site looks like this:
server {
listen 80;
listen [::]:80;
server_name mytiddlywiki.mysite.com;
access_log /var/log/nginx/mytiddlywiki.mysite.com.access.log combined;
location / {
proxy_pass http://127.0.0.1:8081/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mytiddlywiki.mysite.com;
ssl_certificate /etc/letsencrypt/live/mytiddlywiki.mysite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mytiddlywiki.mysite.com/privkey.pem;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# vhost specific logs
access_log /var/log/nginx/mytiddlywiki.mysite.com.access.log combined;
location / {
proxy_pass http://127.0.0.1:8081/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Notes:- My server above is called "mytiddlywiki.mysite.com" - replace this with your server's full domain name.
- I run the Node instance on port 8081 (in the ProxyPass line), replace this with your port.
If anyone wants to add the matching Apache code as a reply, that would be handy too.
Cheers,
David.