CosmoCMS / Cosmo

Single Page App CMS
http://www.cosmocms.org/
MIT License
276 stars 65 forks source link

Issue on Install (From Facebook) #299

Open jordanddunn opened 9 years ago

jordanddunn commented 9 years ago

Hello!... I think I'm kindda lose with the CMS installation... well, I installed it and the it displays a message telling me that now I can navigate the site or enter /admin to login, but when I try http://localhost/cosmoCMS/ it says that the index.php file can't be found (eventhough index.php file exists in myCosmo folder). I hope you can help me with this... your CMS looks awesome and I would like to help you with i18n (for spanish).

pwalimbe commented 9 years ago

Sorry for bumping in here, but I also was able to get cosmo eventually installed and when I try to view /index.php I get error and blank page. using chrome debugger I was able to figure out it is some AngularJS problem. GET http://localhost/api/content?url=%2Findex.php 404 (Not Found) angular-resource.js:6 angular-resource.js:6 sangular-resource.js:6 $get.hangular-resource.js:6 l.promise.then.Langular-resource.js:6 l.promise.then.Langular-resource.js:6 (anonymous function)angular-resource.js:6 $get.g.$evalangular-resource.js:6 $get.g.$digestangular-resource.js:6 $get.g.$applyangular-resource.js:6 (anonymous function)angular-resource.js:6 eangular-resource.js:6 dangular-resource.js:6 icangular-resource.js:6 kdangular-resource.js:6 (anonymous function)angular-resource.js:6 aangular-resource.js:6 (anonymous function)angular-resource.js:21 qangular-resource.js:6 c

I tried to debug but was not able to do so. Hope this information is useful.

James-Dunn commented 9 years ago

@pwalimbe Do you have mod-rewrite active on your Apache server? Looks like a routing issue.

pwalimbe commented 9 years ago

@James-Dunn thanks for reaching out. I am using nginx. Here is the relevant portion of the server conf if you require it.

server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /home/prasanna/Source/myGit/Cosmo-1.0.0Beta3/; index index.php index.html index.htm; server_name localhost;

location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
    # Uncomment to enable naxsi on this location
    # include /etc/nginx/naxsi.rules
}

location ~ \.php$ {
     try_files $uri =404;   
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
     #
     #       # With php5-cgi alone:
     #       fastcgi_pass 127.0.0.1:9000;
     #       # With php5-fpm:
     fastcgi_pass unix:/var/run/php5-fpm.sock;
     fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
#}

error_page 404 /404.html;

#}

}

James-Dunn commented 9 years ago

@pwalimbe I haven't used nginx, but you might find another user's solution helpful. #293

His config was

location / {
 try_files $uri $uri/ /core/app/api.php$is_args$args core/app/sitemap.php$is_args$args /index.php$is_args$args;
}
location ~* \.(js|css|xml|gz)$ {
    gzip on;
    add_header Vary "Accept-Encoding";
}