- 浏览: 2551687 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Grav CMS System(2)Nginx and FPM
Download the latest stable nginx
https://nginx.org/en/download.html
> wget https://nginx.org/download/nginx-1.14.0.tar.gz
Configure and make and make install that tool
> ./configure --prefix=/Users/hluo/tool/nginx-1.14.0
Once everything is done, here is the command to start
> sbin/nginx
Command to stop
> sbin/nginx -s stop
Set Up and FPM
Last time, I already install latest PHP on my machine. So I already have PHP-FPM installed.
Prepare the configuration file
> mv etc/php-fpm.d/www.conf.default etc/php-fpm.d/www.conf
> mv etc/php-fpm.conf.default etc/php-fpm.conf
You can change the port number or listen in www.conf, here is the command start php-fpm
> sudo sbin/php-fpm -R
Check the port running
> netstat -ant | grep 9000
tcp4 0 0 127.0.0.1.9000 *.* LISTEN
Check the process
> ps -ef | grep fpm
0 17164 1 0 8:15AM ?? 0:00.01 sbin/php-fpm -R
70 17165 17164 0 8:15AM ?? 0:00.00 sbin/php-fpm -R
Set Up Nginx to Redirect request to FPM
Make some changes to nginx configuration file
> vi conf/nginx.conf
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Edit PHP test page
> vi html/info.php
<?php phpinfo();?>
Visit this page, you can see the PHP info
http://localhost/info.php
It contains a lot of detail information about my PHP, that is great.
Set Up Grav
Download the latest Grav and Admin Plugin package
https://getgrav.org/downloads
Unzip the package grav-admin-v1.5.4.zip
Unzip the file and place grav under /opt/nginx/html/grav, but when I visit http://localhost/grav/index.php I face some permission issues
Check the nginx running user
> ps aux | grep -v root | grep nginx | cut -d\ -f1 | sort | uniq
hluo
nobody
I change the configuration in nginx.conf to use current user
user username groupname;
And give all permission
chmod -R 777 ./grav/
Configuration is as follow:
user hluo staff;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
root /opt/nginx/html/grav;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
Visit the admin page
Finally it works when I visit this page
http://localhost/admin
Visit the Normal Page
http://localhost/
Edit few pages, all the contents are here
/opt/nginx/html/grav/user/pages
References:
https://segmentfault.com/a/1190000003067656
https://www.jianshu.com/p/907eec663cf1
https://learn.getgrav.org/basics/installation
https://github.com/getgrav/grav/blob/master/webserver-configs/nginx.conf
https://medium.com/cupofjoeio/brewing-nginx-and-php7-for-grav-development-on-mac-os-x-el-capitan-bf54237a6327
https://learn.getgrav.org/troubleshooting/permissions
Download the latest stable nginx
https://nginx.org/en/download.html
> wget https://nginx.org/download/nginx-1.14.0.tar.gz
Configure and make and make install that tool
> ./configure --prefix=/Users/hluo/tool/nginx-1.14.0
Once everything is done, here is the command to start
> sbin/nginx
Command to stop
> sbin/nginx -s stop
Set Up and FPM
Last time, I already install latest PHP on my machine. So I already have PHP-FPM installed.
Prepare the configuration file
> mv etc/php-fpm.d/www.conf.default etc/php-fpm.d/www.conf
> mv etc/php-fpm.conf.default etc/php-fpm.conf
You can change the port number or listen in www.conf, here is the command start php-fpm
> sudo sbin/php-fpm -R
Check the port running
> netstat -ant | grep 9000
tcp4 0 0 127.0.0.1.9000 *.* LISTEN
Check the process
> ps -ef | grep fpm
0 17164 1 0 8:15AM ?? 0:00.01 sbin/php-fpm -R
70 17165 17164 0 8:15AM ?? 0:00.00 sbin/php-fpm -R
Set Up Nginx to Redirect request to FPM
Make some changes to nginx configuration file
> vi conf/nginx.conf
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Edit PHP test page
> vi html/info.php
<?php phpinfo();?>
Visit this page, you can see the PHP info
http://localhost/info.php
It contains a lot of detail information about my PHP, that is great.
Set Up Grav
Download the latest Grav and Admin Plugin package
https://getgrav.org/downloads
Unzip the package grav-admin-v1.5.4.zip
Unzip the file and place grav under /opt/nginx/html/grav, but when I visit http://localhost/grav/index.php I face some permission issues
Check the nginx running user
> ps aux | grep -v root | grep nginx | cut -d\ -f1 | sort | uniq
hluo
nobody
I change the configuration in nginx.conf to use current user
user username groupname;
And give all permission
chmod -R 777 ./grav/
Configuration is as follow:
user hluo staff;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
root /opt/nginx/html/grav;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
Visit the admin page
Finally it works when I visit this page
http://localhost/admin
Visit the Normal Page
http://localhost/
Edit few pages, all the contents are here
/opt/nginx/html/grav/user/pages
References:
https://segmentfault.com/a/1190000003067656
https://www.jianshu.com/p/907eec663cf1
https://learn.getgrav.org/basics/installation
https://github.com/getgrav/grav/blob/master/webserver-configs/nginx.conf
https://medium.com/cupofjoeio/brewing-nginx-and-php7-for-grav-development-on-mac-os-x-el-capitan-bf54237a6327
https://learn.getgrav.org/troubleshooting/permissions
发表评论
-
Stop Update Here
2020-04-28 09:00 316I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 475NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 368Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 369Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 336Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 430Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 435Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 374Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 455VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 384Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 478NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 423Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 337Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 247GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 450GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 328GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 314Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 317Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 293Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 312Serverless with NodeJS and Tenc ...
相关推荐
该剧本安装了NGINX,PHP7和Grav。 它还会安装和推荐PHP模块,并根据建议对php.ini和调整。 这些配置来自Grav文档中显示的内容。 Master分支将安装Grav Admin'Vanilla'单页网站。 如果要尝试使用“ 氦骨架”站点,则...
2. **即时更新**:由于Grav的静态渲染机制,当你保存更改后,内容会立即更新,无需刷新页面或执行任何缓存清除操作。 3. **高性能**:Grav优化了文件读取和解析,确保了即使在高流量情况下也能保持快速的页面加载...
Grav-码头工人Docker容器。 该图像基于PHP fpm-buster图像。 您可以在找到源代码标签最新(当前为1.7) 最新产品(当前为1.7产品) 1.6 1.6。* 1.6产品1.6。*-prod 1.7 1.7。* 1.7产品1.7。*-prod用法这纯粹是基于...
Grav 是一个现代开源平面文件 CMS。 性能不仅仅是事后的想法,我们从一开始就将其融入其中。 Grav 拥有强大的 API 和复杂的包管理器,使其非常灵活。 Grav 是开源的,所有代码都可以在 GitHub.com 上找到。 Grav ...
**JsonDB:Grav CMS 的简单 JsonDB 类** 在 Web 开发领域,内容管理系统(CMS)如 Grav CMS 提供了一种便捷的方式来管理和发布网站内容。Grav 是一个基于 PHP 的现代、轻量级且无需数据库的 CMS。它依赖于文件系统...
Grav CMS的Mache主题 麻车的主题是港口通过通过,原PSD设计 。 Mache HTML模板不包含博客和联系表单的设计。 为了使该Grav主题更有用,该Grav主题的作者根据Mache HTML模板提供的样式添加了博客和联系表单。 博客和...
Grav CMS的X-Corporation主题 X-Corporation主题是进行的的。 演示版 可在上获取此骨架的演示。 特征 专业的用户界面 React灵敏且移动友好 轻量级和快速加载 干净利落的字体 大型,粘性和画布菜单 搜索引擎优化 ...
这 :black_circle: Blackhole插件适用于 。 如果此插件对您有帮助,请 描述 为什么是黑洞? Grav是一个空格术语,因此我认为此插件也应效仿。...必须在Grav System Configuration(重力系统配置)中启用绝对URL
Grav是一个非常强大的CMS,但对于想要尽可能接近手动编码HTML的用户,应该有一个选择。 该主题试图将形式和功能分开以创建真正独特的体验。 ! 产品特点 几乎失重以实现最佳性能 CSS / JS静噪可完全消除所有不必要...
Grav CMS的X-Corporation主题 X-Corporation主题是进行的的。演示版有关这个主题的演示,请访问特征专业的用户界面React灵敏且移动友好轻量级和快速加载干净利落的字体大型,粘性和画布菜单搜索引擎优化兼容现代...
Grav 的自由职业者主题 这个 Grav 主题基于的,源自的。 演示 这个主题的演示可以在这里找到: : 完全加载的 Grav 骨架,所有必要的插件和内容都在此处提交: : 特征 flaticons.com 的平面图标 包含 LESS 文件和...
基础 Foundation是使用Zurb的Foundation前端框架的... 在您的Grav安装目录的根目录中: bin/gpm install foundation这会将Foundation主题安装到Grav中的/user/themes目录中。 它的文件可以在/your/site/grav/user/them
Grav 的自由职业者骨架 这个 Grav 骨架基于,而又基于的,该源自的。演示这个骨架的演示可以在这里找到: : 另外添加了内容的基本本地化,请尝试: (与相同) 特征flaticons.com 的平面图标包含 LESS 文件和编译的 ...
Grav 可使用 ContentTools 插件进行编辑 使用ContentTools可编辑插件是用于。 版本 1.6.2 已成功通过 Grav 1.7.0-rc.20 测试 该插件允许作者使用 WYSIWYG 编辑器在前端编辑页面内容并将其保存为 Markdown。 重要...
Grav Topic菜单插件 topicmenu是一个简单的插件,它遍历网站的一部分(通常为/blog ,并创建一个包含第一级分类法和与之相关的每个第二级分类法的二维数组。 换句话说,它返回一个像这样的数组: topicmenu_array...
《基于Python的重力反演GUI程序:grav3d-gui深入解析》 在现代地球科学和地质勘探领域,重力反演是一种重要的技术手段,它通过对地表或地下物体的重力场进行分析,来推断其密度分布和结构特征。在Python编程环境中...
Grav CMS的Mache骨架 麻车skelenton是纸浆主题,一个端口的骨架通过通过,原PSD设计 。 演示版 您可以在此处查看演示: 。 特征 重力特征: 蓝图支持:编辑管理插件中的所有内容 支持 支持 支持 HTML功能: HTML5...
**Grav CMS与Benjamin Paulus主题** Grav是一个现代的、基于文件系统的轻量级内容管理系统(CMS),它不需要数据库,而是依赖于Markdown文件来存储内容。这种设计使得Grav易于安装,快速且可高度自定义。Grav的核心...