This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

taylankoca
taylankoca

When I use october on digital ocean LAMP on Ubuntu 14.04, it allways fail to load images, I don't know why.

Ex: http://188.226.218.102/infisis/

godbrain
godbrain

looks like a routing/rewrite issue...

Autumn
Autumn

I use digital ocean but i installed manually nginx and php fpm and database mariadb or persona (i dont't remember )

Kirill
Kirill

Check your configuration. On apache I had to enable: AllowOverride All

taylankoca
taylankoca

I edited /etc/apache2/apache2.conf

Still not working: http://188.226.218.102/infisis/

    Options Indexes FollowSymLinks Multiviews
    AllowOverride All
    Order allow,deny
    allow from all

    AllowOverride None
    Require all granted

    Options Indexes FollowSymLinks Multiviews
    AllowOverride All
    Order allow,deny
    allow from all

daftspunky
daftspunky

Open your .htaccess file and uncomment this line:

    ##
    ## You may need to uncomment the following line for some hosting environments,
    ## if you have installed to a subdirectory, enter the name here also.
    ##
    # RewriteBase /

To be

    RewriteBase /infisis/
Boris
Boris

if you use nginx as the web server you're not able to use .htaccess. I have a server-config which works fine for me:

    server { 
listen    12.123.123.123:80 default; 
server_name    youtsite.com *.yoursite.com;
access_log      /var/www/log/access.log combined;
    error_log    /var/www/log/error.log error;
root     /var/www/htdocs/;

    location / {
index    index.php index.html index.htm;
try_files $uri $uri/ @rewrites;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_index index.php;
    fastcgi_pass unix:/var/run/php5-fpm.socket;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
}

error_page 404 /index.php;
autoindex off;

## Only allow these request methods ##
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
    return 444;
    }

## Block download agents ##
if ($http_user_agent ~* (libwww-perl|wget|python|nikto|curl|scan|java|winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) ) {
return 403;
}

## Deny certain Referers ##
    if ( $http_referer ~* (babes|forsale|girl|jewelry|love|nudit|organic|poker|porn|sex|teen) ) {
    return 403;
}

## Directory Protection ##
location ~ /\. { 
deny  all; 
}

## sample ##
    #location /zbblock/ {
#deny all;
#return 404;
#}

## RESSOURCES ##
location ~ \.(?:ico|png|jpe?g|css|js)$ {
expires 31d;        
add_header Pragma "public";
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}

location ~ \.(php~|.php.bak)$ {
    deny all;
    return 404;
}

## REWRITES ##
location ~ ^/(\d+)/$ {
return 301 /?p=$1;
}

location @rewrites {
rewrite ^ /index.php last;
}
    }

and also activate the php mod_rewrite

Last updated

taylankoca
taylankoca

I changed rewrite base, and used

sudo a2enmod rewrite sudo service apache2 restart

then it worked.

1-8 of 8

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.