Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Server Mode

Chris Diana edited this pageNov 21, 2018 ·3 revisions

In Server mode, CMS.js takes advantage of the Server's Directory Indexing feature. By allowing indexes, CMS.js sends an AJAX call to your specified folders and looks for Markdown or HTML files. After they are found, it takes care of everything else and delivers a full website.

Apache, NGINX,Node HTTP-Server,Node Ecstatic andPython SimpleHTTPServer servers are supported usingServer Mode.

Apache Server

For CMS.js to run, make sure to enable the directory indexing feature. You can do this two ways:

  • Option #1: Enable .htaccess - If you have .htaccess enabled, you're good to go!
  • Option #2: Apache config file - Add directory option to Apache configuration file/etc/httpd/httpd.conf or/etc/apache2/apache2.conf most likely:
<Directory /var/www/mysite.com/>  Options Indexes</Directory>

Make sure to restart Apache by either running/etc/init.d/httpd restart or/etc/init.d/apache2 restart.

NGINX Server

Verify that yournginx.conf has theautoindex on option:

server {        listen 80;        root "path to the directory of files";        index index.html index.htm;        server_name "name of the virtual host";        location / {                try_files $uri $uri/ /index.html;                autoindex on;                autoindex_exact_size off;        }}

Node HTTP-Server

Install

$ npm install -g http-server

Then, run in the directory where CMS.js is

$ http-server my-cms-js-blog/

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp