totaljs / cms

Node.js Content Management System
http://www.totaljs.com/cms/
MIT License
223 stars 92 forks source link

Total.js on Cpanel server #10

Closed hostcubit closed 5 years ago

hostcubit commented 5 years ago

Hi ... First of all I want to congratulate the developers of this script for the great work contributed

I installed the script on a Cpanel server, I activate the proxy modules in apache ( WHM EA4 ) and in the installation of the cms app configure the .htaccess

Everything works perfectly, except the home page / returns 404 What can this be due to?

Thanks in advance

BEGIN SSL

RewriteEngine on RewriteCond %{HTTPS} !=on [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

END SSL

BEGIN Total.js

RewriteEngine On RewriteRule ^(.*)$ http://%{HTTP_HOST}:8000/$1 [P,L]
petersirka commented 5 years ago

Hi @hostcubit - thank you, do other pages work? Does the homepage work on your localhost? I don't have any experience with Cpanel.

BTW: Is 404 from Total.js or from Apache? If yes are you sure you have registered / homepage page in CMS? If yes then a problem can be in URL, just try to log requests in Total.js and try to capture URL address from your proxy:

ON('request', function(req) {
    console.log(req.url); // it must be "/" for homepage
});
hostcubit commented 5 years ago

yes on localhost works perfectly

https://hostqubit.com/ --- 404

https://hostqubit.com/blog/ --- ok

petersirka commented 5 years ago

Try capture URL as I wrote before. I'm on a business trip, but I'll be online today later. Let me know to result.

hostcubit commented 5 years ago

Ok thank you

In console log this:

/favicon.ico /index.js /favicon.ico /index.js /favicon.ico /index.js /favicon.ico /index.js /favicon.ico /index.js /favicon.ico /index.js /favicon.ico /index.js /favicon.ico /index.js /favicon.ico /index.js /favicon.ico /index.js /favicon.ico

petersirka commented 5 years ago

I think there is a problem in a reverse proxy... This is my log result:

/
/widgets.css?ts=hygfx
/default/css/default.css
/default/js/default.js
/default/img/logo.png
/$visitors/