Hi,
Unfortunately with version 4.14.4 it gets even worse.
I’m in production and so I can’t do a clean installation by emptying the database.
I can only do a clean installation of the software.
Among other things, the problem of sub-folders is also reflected in how to reach the address of admin: I have to use twice the url /strapi in the address bar of the browser (mydomain/strapi/strapi/admin).
I think that strapi has problems in managing url in the case of subfolders.
Check out my configuration files: I don’t think there are any errors or something missing
server.ts
export default ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
url: env('STRAPI_URL', '/strapi'),
app: {
keys: env.array('APP_KEYS'),
},
webhooks: {
populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false),
},
});
admin.ts
export default ({ env }) => ({
url: env('STRAPI_ADMIN_URL', '/strapi/admin'),
auth: {
secret: env('ADMIN_JWT_SECRET'),
},
apiToken: {
salt: env('API_TOKEN_SALT'),
},
transfer: {
token: {
salt: env('TRANSFER_TOKEN_SALT'),
},
},
});
apache proxy config
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName mydomain
ServerAlias mydomain
DocumentRoot /var/www/mydomain/html/client
<Directory /var/www/mydomain/html/client>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
ProxyPreserveHost On
ProxyRequests Off
ProxyPass /strapi http://localhost:1337
ProxyPassReverse /strapi http://localhost:1337
</VirtualHost>
</IfModule>