首页
随机
最近更改
特殊页面
社群首页
参数设置
关于WHY42
免责声明
WHY42
搜索
用户菜单
登录
欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。
查看“︁Nginx config”︁的源代码
←
Nginx config
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
=Configuration= ==Serve React== Note: * Solve browser route 404:<ref>https://stackoverflow.com/questions/45598779/react-router-browserrouter-leads-to-404-not-found-nginx-error-when-going-to</ref> <syntaxhighlight lang="nginx"> server { root /var/www/html; server_name yai.ink; location / { try_files $uri $uri/ /index.html; } } </syntaxhighlight> ==Reverse proxy== Note: be careful that the backend should also use correct config. <syntaxhighlight lang="nginx"> server { index index.html index.htm index.nginx-debian.html; server_name yai.ink; location / { proxy_pass http://localhost:8000; } } </syntaxhighlight> [[Category:Linux/Unix]]
返回
Nginx config
。