-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Closed
Copy link
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: core:uploadSource is core/upload packageSource is core/upload packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
Bug report
Required System information
- Strapi Version: 4.13.7
- Operating System: Ubuntu 20.04.6 LTS
- Database: mySQL 8.0.34 (using mysql2 as driver)
- Node Version: 18.18.0
- NPM Version: 9.8.1
- Yarn Version: none
- Dev language: typescript
Describe the bug
When I try to load one or more images (size: 5kb) Strapi Admin get an error message:
Woops! Something went wrong. Please, try again.
Steps to reproduce the behavior
- Go to
Media Library - Click on
Add new assets - Browsing files or dragging the image (max image size used is 5kb)
- See error
Woops! Something went wrong. Please, try again. - The error reported in the console is:
No error messages on server log.
Additional context
The production strapi configuration is under the sub path /strapi
My config/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),
},
});My config/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'),
},
},
});No api prefix configured in config/admin.ts.
Any other configuration do not work with my apache proxy configuration (HTTP 404 Not found error message emitted by strapi).
Admin build command:
NODE_ENV=production STRAPI_URL=/strapi STRAPI_ADMIN_URL=/strapi/admin npm run build
My apache proxy config:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName mydomain
ServerAlias mydomain
ServerAdmin myemail
DocumentRoot /var/www/mydomain/html
<Directory /var/www/mydomain/html>
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>
When I make the same test on local machine, without server url field definition, strapi admin works fine.
Can someone help me? Thank you in advance
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundsource: core:uploadSource is core/upload packageSource is core/upload packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Type
Projects
Status
Fixed/Shipped
