This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I installed the latest version of October CMS and everything works fine, except the Media Manager.
When I upload a file via the MM, everything works ok, but when I try to access the image from a page, partial or even directly from the address bar in the browser, then I get a 404 not found.
E.g. if I upload logo.png, the file is placed in "/storage/app/media/logo.png"
Trying to access it with http://
Those are the rules in my nginx conf file:
location / {
try_files $uri $uri/ @october;
}
location @october {
rewrite ^themes/.*/(layouts|pages|partials)/.*.htm /index.php break;
rewrite ^bootstrap/.* /index.php break;
rewrite ^config/.* /index.php break;
rewrite ^vendor/.* /index.php break;
rewrite ^storage/cms/.* /index.php break;
rewrite ^storage/logs/.* /index.php break;
rewrite ^storage/framework/.* /index.php break;
rewrite ^storage/temp/protected/.* /index.php break;
rewrite ^storage/app/uploads/protected/.* /index.php break;
rewrite . /index.php last;
}
###
### send all non-static requests to php-fpm
###
location ~ \.php$ {
try_files $uri @october; ### check for existence of php file first
fastcgi_pass unix:/var/run/www54.fpm.socket;
}
###
### serve & no-log static files & images directly, without all standard rewrites, php-fpm etc.
###
location ~* ^.+\.(jpg|jpeg|gif|png|ico|swf|pdf|doc|xls|tiff|tif|txt|shtml|cgi|bat|pl|dll|asp|exe|class|css|js)$ {
access_log off;
expires 30d;
try_files $uri =404;
}
###
### serve & log bigger media/static/archive files directly, without all standard rewrites, php-fpm etc.
###
location ~* ^.+\.(avi|mpg|mpeg|mov|wmv|mp3|mp4|m4a|flv|wav|midi|zip|gz|rar)$ {
expires 30d;
try_files $uri =404;
}
###
### make feeds compatible with boost caching and set correct mime type - nginx 0.7.27 or newer required with try_files support
###
location ~* \.xml$ {
charset utf-8;
types { }
default_type application/rss+xml;
try_files $uri @october;
}
You don't need to put rules for the media manager in your NGINX config. All you need to put is the following:
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
rewrite ^themes/.*/(layouts|pages|partials)/.*.htm /index.php break;
rewrite ^bootstrap/.* /index.php break;
rewrite ^config/.* /index.php break;
rewrite ^vendor/.* /index.php break;
rewrite ^storage/cms/.* /index.php break;
rewrite ^storage/logs/.* /index.php break;
rewrite ^storage/framework/.* /index.php break;
rewrite ^storage/temp/protected/.* /index.php break;
rewrite ^storage/app/uploads/protected/.* /index.php break;
Nginx configuration There are small changes required to configure your site in Nginx.
nano /etc/nginx/sites-available/default
Use the following code in server section. If you have installed October into a subdirectory, replace / with > the directory October was installed under:
On documentation.
@FelixINX I did that and still having problems with the storage folder is there anyone else out there with a better solution?
the same problem i am facing.my logo does not upload to media manager because of this they are not appearing in website.
1-5 of 5