I installed strapi app in VPS and I got that error when accessing main url. But when I accessing the admin panel it was working well. Only the main url show that error.
This is the main url https://phpstack-841991-2984224.cloudwaysapps.com/
And this is my setup on config/server.js
and config/admin.js
config/server.js
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
app: {
keys: env.array('APP_KEYS'),
},
url: env('PUBLIC_URL', 'https://phpstack-841991-2984224.cloudwaysapps.com'),
});
I add PUBLIC_URL=https://phpstack-841991-2977756.cloudwaysapps.com
inside .env
file
config/admin.js
module.exports = ({ env }) => ({
auth: {
secret: env('ADMIN_JWT_SECRET'),
},
apiToken: {
salt: env('API_TOKEN_SALT'),
},
});
And I also added htaccess file
# Redirect traffic to your port 1337
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)?$ http://127.0.0.1:1337/$1 [P,L]
What’s wrong with my setup and maybe anyone have some solutions with my issue ?
Thanks before.