-
Hi, I configured three Docker containers - one for SQLPage, one for Nginx and one for mysql. Because I'm not very good at any of the three, I put the site files in the root folder, so that the url is of the form www.mysite.com (so no subfolder like www.mysite.com/ foo). Everything works, but I cannot configure nginx to add the '.sql' extension to the url when it is missing. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Solved with two rewrite location / {
rewrite ^(.+)/$ $1 permanent;
rewrite ^(/[^.]*[^/])$ $1.sql break;
proxy_pass http://sqlpage:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
} |
Beta Was this translation helpful? Give feedback.
-
Hello ! I just added a full example for using sqlpage together with nginx using docker to the repo: https://github.com/lovasoa/sqlpage/tree/main/examples/nginx |
Beta Was this translation helpful? Give feedback.
Solved with two rewrite