I am currently deploying Strapi on AWS EC2 with Ubuntu and Nginx.
Strapi Version: 4.25.3
My website is, for example, https://www.my-site.com, and the default root path for the front end is https://www.my-site.com/web.
Here is my server.ts for Strapi:
export default ({ env }) => ({
host: env(‘HOST’, ‘0.0.0.0’),
port: env.int(‘PORT’, 1337),
app: {
keys: env.array(‘APP_KEYS’),
},
webhooks: {
populateRelations: env.bool(‘WEBHOOKS_POPULATE_RELATIONS’, false),
},
proxy: true,
url: env(‘ADMIN_PANEL_URL’, ‘’)
});
And here is my Nginx configuration:
location / {
proxy_pass http://127.0.0.1:1337;
}
location /api {
proxy_pass http://127.0.0.1:1337;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
}
location /web {
alias /var/www/html/web;
try_files $uri $uri/ /web/index.html;
}
location /admin {
proxy_pass http://127.0.0.1:1337/admin;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
}
Although I can see the admin panel login screen at https://www.my-site.com/admin, it gets stuck on loading after I log in. When I open the Developer Tools (F12), I notice that the request to https://www.my-site.com/admin/admin responds with “JavaScript disabled. Please enable JavaScript in your browser and reload the page to proceed.”
I want to know what the problem is. Please help me.
This topic has been created from a Discord post (1277293707367809076) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord