Mojolicious doesn't grab url (base url only)
I created a simple API using mojolicious
, but I just switched from Apache to Nginx
and can't figure out how to properly handle the url.
Here is my server config file
server {
listen 80;
listen [::]:80;
root /var/www/example.com/public_html;
index index.pl index.html index.htm index.nginx-debian.html;
server_name example.com www.example.com;
location / {
gzip off;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:8090;
fastcgi_param SCRIPT_FILENAME /var/www/example/public_html/$fastcgi_script_name;
}
}
It gets processed mojolicious
, but I get the following result.
Method: GET
URL:
Base URL: http://example.com/clients/
As you can see, the base url is fixed, but the url is empty.
My pattern
Pattern Methods Name
/clients GET clients
What's wrong? How can I handle requests correctly?
+3
source to share