Certbot和nginx版本:
使用certbot.eff.org安装指南安装certbot.
获得ssl证书工作正常:
certbot --nginx
但是,在更新cerbot认证
certbot renew --dry-run
nginx无法启动导致:
nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)
我试过更改后挂钩和预挂钩 /etc/letsencrypt/renewal/*com.conf/
installer=nginx添加post和pre hooks /etc/letsencrypt/renewal-hooks/pre/以及/etc/lestencrypt/renewal-hooks/post/停止和启动nginx服务.
似乎nginx无法正常启动或未正常停止.续订完成后nginx失败(代码=退出,状态= 1/FAILURE)
Nginx错误日志显示:
我试图用django,express,react和react-router-dom实现服务器端渲染.
server.js
const html = renderToString((
<Provider store={store}>
<StaticRouter basename={baseUrl} location={location} context={context}>
<AppRoute />
</StaticRouter>
</Provider>
), null, 2);
const preloadedState = store.getState();
res.send(renderFullPage(html, preloadedState))
Run Code Online (Sandbox Code Playgroud)
client.js的index.js
ReactDOM.render(
<Provider store={store}>
<Router>
<AppRoute />
</Router>
</Provider>,
document.getElementById('app')
);
Run Code Online (Sandbox Code Playgroud)
AppRoute为客户端使用RouteAsync,为服务器使用RouteSync
AppRoute.js导入
import {App} from './RouteSync'
import {CollegeList} from './RouteSync'
import {CollegeDetail} from './RouteSync'
Run Code Online (Sandbox Code Playgroud)
RouteAsync.js
export const App = asyncRoute(() => System.import('../app'));
export const CollegeList = asyncRoute(() => System.import('../apps/college/CollegeList'));
export const CollegeDetail = asyncRoute(() => System.import('../apps/college/CollegeDetail'));
Run Code Online (Sandbox Code Playgroud)
RouteSync.js
export { default as App } from …Run Code Online (Sandbox Code Playgroud)